Compare commits
7 Commits
4952c88b2e
...
856d2597df
Author | SHA1 | Date | |
---|---|---|---|
![]() |
856d2597df | ||
![]() |
44a0d75996 | ||
![]() |
62f6b7f3c5 | ||
![]() |
6150d327da | ||
![]() |
522ccfecc4 | ||
![]() |
4788ae4ccf | ||
![]() |
c3191e8f88 |
4
.github/workflows/ci-linux.yml
vendored
@ -16,7 +16,7 @@ on:
|
|||||||
default: false
|
default: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VNOTE_VER: 3.19.1
|
VNOTE_VER: 3.19.2
|
||||||
CMAKE_VER: 3.24.3
|
CMAKE_VER: 3.24.3
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -64,7 +64,7 @@ jobs:
|
|||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ../Qt
|
path: ${{runner.workspace}}/Qt
|
||||||
key: ${{ runner.os }}-QtCache-6.8
|
key: ${{ runner.os }}-QtCache-6.8
|
||||||
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
|
64
.github/workflows/ci-macos.yml
vendored
@ -16,7 +16,7 @@ on:
|
|||||||
default: false
|
default: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VNOTE_VER: 3.19.1
|
VNOTE_VER: 3.19.2
|
||||||
CMAKE_VER: 3.24.3
|
CMAKE_VER: 3.24.3
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -84,7 +84,7 @@ jobs:
|
|||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ../Qt
|
path: ${{runner.workspace}}/Qt
|
||||||
key: ${{ runner.os }}-QtCache-6.8
|
key: ${{ runner.os }}-QtCache-6.8
|
||||||
|
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
@ -108,9 +108,38 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
run: |
|
run: |
|
||||||
# Remove the libqsqlmimer.so as libmimerapi.so is not deployed with Qt6
|
# Keep only required SQL drivers
|
||||||
rm ${{env.Qt6_DIR}}/plugins/sqldrivers/libqsqlmimer.dylib
|
rm ${{env.Qt6_DIR}}/plugins/sqldrivers/libqsqlmimer.dylib
|
||||||
|
rm ${{env.Qt6_DIR}}/plugins/sqldrivers/libqsqlodbc.dylib
|
||||||
|
rm ${{env.Qt6_DIR}}/plugins/sqldrivers/libqsqlpsql.dylib
|
||||||
|
|
||||||
|
# Build the project
|
||||||
cmake --build . --target pack
|
cmake --build . --target pack
|
||||||
|
|
||||||
|
# Fix Qt frameworks
|
||||||
|
python3 ${{runner.workspace}}/macdeployqtfix/macdeployqtfix.py ./src/VNote.app/Contents/MacOS/VNote ${{env.Qt6_DIR}}/../..
|
||||||
|
|
||||||
|
# Only delete rpaths that exist to avoid errors
|
||||||
|
for rpath in $(otool -l ./src/VNote.app/Contents/MacOS/VNote | awk '/LC_RPATH/ {getline; getline; print $2}' | grep 'vnote'); do
|
||||||
|
echo "Checking rpath: $rpath"
|
||||||
|
if otool -l ./src/VNote.app/Contents/MacOS/VNote | grep -q "$rpath"; then
|
||||||
|
echo "Deleting rpath: $rpath"
|
||||||
|
install_name_tool -delete_rpath "$rpath" ./src/VNote.app/Contents/MacOS/VNote
|
||||||
|
else
|
||||||
|
echo "Rpath not found: $rpath"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for rpath in $(otool -l ./src/VNote.app/Contents/Frameworks/libVTextEdit.dylib | awk '/LC_RPATH/ {getline; getline; print $2}' | grep 'vnote'); do
|
||||||
|
echo "Checking rpath: $rpath"
|
||||||
|
if otool -l ./src/VNote.app/Contents/Frameworks/libVTextEdit.dylib | grep -q "$rpath"; then
|
||||||
|
echo "Deleting rpath: $rpath"
|
||||||
|
install_name_tool -delete_rpath "$rpath" ./src/VNote.app/Contents/Frameworks/libVTextEdit.dylib
|
||||||
|
else
|
||||||
|
echo "Rpath not found: $rpath"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Run macdeployqtfix again to ensure all dependencies are properly fixed
|
||||||
python3 ${{runner.workspace}}/macdeployqtfix/macdeployqtfix.py ./src/VNote.app/Contents/MacOS/VNote ${{env.Qt6_DIR}}/../..
|
python3 ${{runner.workspace}}/macdeployqtfix/macdeployqtfix.py ./src/VNote.app/Contents/MacOS/VNote ${{env.Qt6_DIR}}/../..
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
@ -134,9 +163,15 @@ jobs:
|
|||||||
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
|
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
|
||||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
|
||||||
|
|
||||||
# We finally codesign our app bundle, specifying the Hardened runtime option
|
echo "Codesigning main app bundle"
|
||||||
/usr/bin/codesign --force --deep -s "$MACOS_CERTIFICATE_NAME" --entitlements ${{github.workspace}}/package/entitlements.xml --options runtime ${{runner.workspace}}/build/src/VNote.app -vvv
|
codesign --force --deep -s "$MACOS_CERTIFICATE_NAME" --entitlements ${{github.workspace}}/package/entitlements.xml --options runtime ./src/VNote.app
|
||||||
/usr/bin/codesign -v -vvv ${{runner.workspace}}/build/src/VNote.app
|
codesign -v -vvv ./src/VNote.app
|
||||||
|
|
||||||
|
hdiutil create -volname "VNote" -srcfolder ./src/VNote.app -ov -format UDZO VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg
|
||||||
|
codesign --force --deep -s "$MACOS_CERTIFICATE_NAME" --entitlements ${{github.workspace}}/package/entitlements.xml --options runtime ./VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg
|
||||||
|
codesign -v -vvv ./VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg
|
||||||
|
|
||||||
|
working-directory: ${{runner.workspace}}/build
|
||||||
|
|
||||||
- name: "Notarize Bundle"
|
- name: "Notarize Bundle"
|
||||||
# Extract the secrets we defined earlier as environment variables
|
# Extract the secrets we defined earlier as environment variables
|
||||||
@ -150,35 +185,24 @@ jobs:
|
|||||||
echo "Create keychain profile"
|
echo "Create keychain profile"
|
||||||
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
|
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
|
||||||
|
|
||||||
# We can't notarize an app bundle directly, but we need to compress it as an archive.
|
|
||||||
# Therefore, we create a zip file containing our app bundle, so that we can send it to the
|
|
||||||
# notarization service
|
|
||||||
echo "Creating temp notarization archive"
|
|
||||||
ditto -c -k --keepParent "${{runner.workspace}}/build/src/VNote.app" "notarization.zip"
|
|
||||||
|
|
||||||
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
|
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
|
||||||
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
|
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
|
||||||
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
|
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
|
||||||
# you're curious
|
# you're curious
|
||||||
echo "Notarize app"
|
echo "Notarize app"
|
||||||
xcrun notarytool submit "notarization.zip" --keychain-profile "notarytool-profile" --wait
|
xcrun notarytool submit "${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg" --keychain-profile "notarytool-profile" --wait
|
||||||
|
|
||||||
# Finally, we need to "attach the staple" to our executable, which will allow our app to be
|
# Finally, we need to "attach the staple" to our executable, which will allow our app to be
|
||||||
# validated by macOS even when an internet connection is not available.
|
# validated by macOS even when an internet connection is not available.
|
||||||
echo "Attach staple"
|
echo "Attach staple"
|
||||||
xcrun stapler staple "${{runner.workspace}}/build/src/VNote.app"
|
xcrun stapler staple "${{runner.workspace}}/build/VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg"
|
||||||
|
|
||||||
- name: Create DMG
|
|
||||||
run: |
|
|
||||||
hdiutil create -volname "VNote" -srcfolder ./src/VNote.app -ov -format UDZO VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}.dmg
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
|
||||||
|
|
||||||
# Enable tmate debugging of manually-triggered workflows if the input option was provided
|
# Enable tmate debugging of manually-triggered workflows if the input option was provided
|
||||||
- name: Setup tmate session
|
- name: Setup tmate session
|
||||||
uses: mxschmitt/action-tmate@v3
|
uses: mxschmitt/action-tmate@v3
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
|
||||||
|
|
||||||
- name: Archive Artifacts
|
- name: Archive DMG
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}
|
name: VNote-${{env.VNOTE_VER}}-mac-${{matrix.config.arch}}
|
||||||
|
4
.github/workflows/ci-win.yml
vendored
@ -16,7 +16,7 @@ on:
|
|||||||
default: false
|
default: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
VNOTE_VER: 3.19.1
|
VNOTE_VER: 3.19.2
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -64,7 +64,7 @@ jobs:
|
|||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ../Qt
|
path: ${{runner.workspace}}/Qt
|
||||||
key: ${{runner.os}}-${{matrix.config.arch}}-QtCache-${{matrix.config.qt}}
|
key: ${{runner.os}}-${{matrix.config.arch}}-QtCache-${{matrix.config.qt}}
|
||||||
|
|
||||||
- name: Install Qt Official Build
|
- name: Install Qt Official Build
|
||||||
|
@ -3,7 +3,7 @@ cmake_minimum_required (VERSION 3.20)
|
|||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.1" CACHE STRING "Minimum OS X deployment version")
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.1" CACHE STRING "Minimum OS X deployment version")
|
||||||
|
|
||||||
project(VNote
|
project(VNote
|
||||||
VERSION 3.19.1
|
VERSION 3.19.2
|
||||||
DESCRIPTION "A pleasant note-taking platform"
|
DESCRIPTION "A pleasant note-taking platform"
|
||||||
HOMEPAGE_URL "https://app.vnote.fun"
|
HOMEPAGE_URL "https://app.vnote.fun"
|
||||||
LANGUAGES C CXX)
|
LANGUAGES C CXX)
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
## v3.19.2
|
||||||
|
* Codesign MacOS Bundle
|
||||||
|
* Fix toolbar expansion button style
|
||||||
|
* Support hot-reloading of theme via --watch-themes option
|
||||||
|
|
||||||
## v3.19.1
|
## v3.19.1
|
||||||
* Fix toolbar button in Qt 6.8
|
* Fix toolbar button in Qt 6.8
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit aaf3b097ac3ae0eed7324efae6ddce23a0130402
|
Subproject commit 50b1421793af3882ddc62ad4e6cf5537e1d7906f
|
24
package/QtWebEngineProcess.entitlements.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.files.user-selected.read-write</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.network.client</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.get-task-allow</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.debugger</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.inherit</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -8,5 +8,17 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.network.client</key>
|
<key>com.apple.security.network.client</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.get-task-allow</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.debugger</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.inherit</key>
|
||||||
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
26
privacy_policy.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Privacy Policy
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
Welcome to VNote! We value your privacy and are committed to protecting your personal information. This Privacy Policy explains how we handle your information when you use our application.
|
||||||
|
|
||||||
|
## Information We Collect
|
||||||
|
VNote does not collect any personal or usage data from its users. Your interactions with the app remain private and are not stored or shared.
|
||||||
|
|
||||||
|
## How We Use Your Information
|
||||||
|
Since VNote does not collect any user data, we do not use, store, or process any personal information.
|
||||||
|
|
||||||
|
## Sharing Your Information
|
||||||
|
As VNote does not collect any user data, we do not share any personal information with third parties.
|
||||||
|
|
||||||
|
## Security
|
||||||
|
While VNote does not collect any user data, we still implement security measures to ensure the integrity and safety of the application itself.
|
||||||
|
|
||||||
|
## Your Choices
|
||||||
|
Since no data is collected, there are no choices or actions required from users regarding their personal information.
|
||||||
|
|
||||||
|
## Children's Privacy
|
||||||
|
Our services are not intended for children under the age of 13. We do not knowingly collect personal information from children under 13.
|
||||||
|
|
||||||
|
## Changes to This Privacy Policy
|
||||||
|
We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on our app. You are advised to review this Privacy Policy periodically for any changes.
|
||||||
|
|
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
#include <QFileOpenEvent>
|
#include <QFileOpenEvent>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QDir>
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QFileSystemWatcher>
|
||||||
|
#include <QTimer>
|
||||||
|
#include <core/vnotex.h>
|
||||||
|
|
||||||
using namespace vnotex;
|
using namespace vnotex;
|
||||||
|
|
||||||
@ -10,6 +15,53 @@ Application::Application(int &p_argc, char **p_argv)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Application::watchThemeFolder(const QString &p_themeFolderPath)
|
||||||
|
{
|
||||||
|
if (p_themeFolderPath.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize watchers only when needed
|
||||||
|
if (!m_styleWatcher) {
|
||||||
|
m_styleWatcher = new QFileSystemWatcher(this);
|
||||||
|
}
|
||||||
|
if (!m_reloadTimer) {
|
||||||
|
m_reloadTimer = new QTimer(this);
|
||||||
|
m_reloadTimer->setSingleShot(true);
|
||||||
|
m_reloadTimer->setInterval(500); // 500ms debounce delay
|
||||||
|
connect(m_reloadTimer, &QTimer::timeout,
|
||||||
|
this, &Application::reloadThemeResources);
|
||||||
|
|
||||||
|
// Connect file watcher to timer
|
||||||
|
connect(m_styleWatcher, &QFileSystemWatcher::directoryChanged,
|
||||||
|
m_reloadTimer, qOverload<>(&QTimer::start));
|
||||||
|
connect(m_styleWatcher, &QFileSystemWatcher::fileChanged,
|
||||||
|
m_reloadTimer, qOverload<>(&QTimer::start));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch the theme folder and its files
|
||||||
|
m_styleWatcher->addPath(p_themeFolderPath);
|
||||||
|
|
||||||
|
// Also watch individual files in the theme folder
|
||||||
|
QDir themeDir(p_themeFolderPath);
|
||||||
|
QStringList files = themeDir.entryList(QDir::Files);
|
||||||
|
for (const QString &file : files) {
|
||||||
|
m_styleWatcher->addPath(themeDir.filePath(file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Application::reloadThemeResources()
|
||||||
|
{
|
||||||
|
VNoteX::getInst().getThemeMgr().refreshCurrentTheme();
|
||||||
|
|
||||||
|
auto stylesheet = VNoteX::getInst().getThemeMgr().fetchQtStyleSheet();
|
||||||
|
if (!stylesheet.isEmpty()) {
|
||||||
|
setStyleSheet(stylesheet);
|
||||||
|
style()->unpolish(this);
|
||||||
|
style()->polish(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool Application::event(QEvent *p_event)
|
bool Application::event(QEvent *p_event)
|
||||||
{
|
{
|
||||||
// On macOS, we need this to open file from Finder.
|
// On macOS, we need this to open file from Finder.
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#ifndef APPLICATION_H
|
#ifndef APPLICATION_H
|
||||||
#define APPLICATION_H
|
#define APPLICATION_H
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
|
class QFileSystemWatcher;
|
||||||
|
class QTimer;
|
||||||
|
|
||||||
namespace vnotex
|
namespace vnotex
|
||||||
{
|
{
|
||||||
class Application : public QApplication
|
class Application : public QApplication
|
||||||
@ -11,11 +13,21 @@ namespace vnotex
|
|||||||
public:
|
public:
|
||||||
Application(int &p_argc, char **p_argv);
|
Application(int &p_argc, char **p_argv);
|
||||||
|
|
||||||
|
// Set up theme folder watcher for hot-reload
|
||||||
|
void watchThemeFolder(const QString &p_themeFolderPath);
|
||||||
|
|
||||||
|
// Reload the theme resources (stylesheet, icons, etc)
|
||||||
|
void reloadThemeResources();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void openFileRequested(const QString &p_filePath);
|
void openFileRequested(const QString &p_filePath);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool event(QEvent *p_event) Q_DECL_OVERRIDE;
|
bool event(QEvent *p_event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QFileSystemWatcher *m_styleWatcher = nullptr;
|
||||||
|
QTimer *m_reloadTimer = nullptr;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,9 @@ CommandLineOptions::ParseResult CommandLineOptions::parse(const QStringList &p_a
|
|||||||
const QCommandLineOption logStderrOpt("log-stderr", MainWindow::tr("Log to stderr."));
|
const QCommandLineOption logStderrOpt("log-stderr", MainWindow::tr("Log to stderr."));
|
||||||
parser.addOption(logStderrOpt);
|
parser.addOption(logStderrOpt);
|
||||||
|
|
||||||
|
const QCommandLineOption watchThemesOpt("watch-themes", MainWindow::tr("Watch theme folder for changes."));
|
||||||
|
parser.addOption(watchThemesOpt);
|
||||||
|
|
||||||
// WebEngine options.
|
// WebEngine options.
|
||||||
// No need to handle them. Just add them to the parser to avoid parse error.
|
// No need to handle them. Just add them to the parser to avoid parse error.
|
||||||
{
|
{
|
||||||
@ -70,5 +73,9 @@ CommandLineOptions::ParseResult CommandLineOptions::parse(const QStringList &p_a
|
|||||||
m_logToStderr = true;
|
m_logToStderr = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (parser.isSet(watchThemesOpt)) {
|
||||||
|
m_watchThemes = true;
|
||||||
|
}
|
||||||
|
|
||||||
return ParseResult::Ok;
|
return ParseResult::Ok;
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,9 @@ public:
|
|||||||
bool m_verbose = false;
|
bool m_verbose = false;
|
||||||
|
|
||||||
bool m_logToStderr = false;
|
bool m_logToStderr = false;
|
||||||
|
|
||||||
|
// Whether to watch theme folder for changes
|
||||||
|
bool m_watchThemes = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COMMANDLINEOPTIONS_H
|
#endif // COMMANDLINEOPTIONS_H
|
||||||
|
@ -24,6 +24,11 @@ Theme::Theme(const QString &p_themeFolderPath,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString vnotex::Theme::getThemeFolder() const
|
||||||
|
{
|
||||||
|
return m_themeFolderPath;
|
||||||
|
}
|
||||||
|
|
||||||
bool Theme::isValidThemeFolder(const QString &p_folder)
|
bool Theme::isValidThemeFolder(const QString &p_folder)
|
||||||
{
|
{
|
||||||
QDir dir(p_folder);
|
QDir dir(p_folder);
|
||||||
|
@ -47,6 +47,8 @@ namespace vnotex
|
|||||||
|
|
||||||
QString name() const;
|
QString name() const;
|
||||||
|
|
||||||
|
QString getThemeFolder() const;
|
||||||
|
|
||||||
static bool isValidThemeFolder(const QString &p_folder);
|
static bool isValidThemeFolder(const QString &p_folder);
|
||||||
|
|
||||||
static Theme *fromFolder(const QString &p_folder);
|
static Theme *fromFolder(const QString &p_folder);
|
||||||
|
@ -24,8 +24,6 @@ ThemeMgr::ThemeMgr(const QString &p_currentThemeName, QObject *p_parent)
|
|||||||
loadAvailableThemes();
|
loadAvailableThemes();
|
||||||
|
|
||||||
loadCurrentTheme(p_currentThemeName);
|
loadCurrentTheme(p_currentThemeName);
|
||||||
|
|
||||||
IconUtils::setDefaultIconForeground(paletteColor("base#icon#fg"), paletteColor("base#icon#disabled#fg"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ThemeMgr::getIconFile(const QString &p_icon) const
|
QString ThemeMgr::getIconFile(const QString &p_icon) const
|
||||||
@ -91,6 +89,7 @@ const Theme &ThemeMgr::getCurrentTheme() const
|
|||||||
|
|
||||||
void ThemeMgr::loadCurrentTheme(const QString &p_themeName)
|
void ThemeMgr::loadCurrentTheme(const QString &p_themeName)
|
||||||
{
|
{
|
||||||
|
m_currentTheme.reset();
|
||||||
auto themeFolder = findThemeFolder(p_themeName);
|
auto themeFolder = findThemeFolder(p_themeName);
|
||||||
if (themeFolder.isNull()) {
|
if (themeFolder.isNull()) {
|
||||||
qWarning() << "failed to locate theme" << p_themeName;
|
qWarning() << "failed to locate theme" << p_themeName;
|
||||||
@ -104,6 +103,8 @@ void ThemeMgr::loadCurrentTheme(const QString &p_themeName)
|
|||||||
qWarning() << "fall back to default theme" << defaultTheme;
|
qWarning() << "fall back to default theme" << defaultTheme;
|
||||||
m_currentTheme.reset(loadTheme(findThemeFolder(defaultTheme)));
|
m_currentTheme.reset(loadTheme(findThemeFolder(defaultTheme)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IconUtils::setDefaultIconForeground(paletteColor("base#icon#fg"), paletteColor("base#icon#disabled#fg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Theme *ThemeMgr::loadTheme(const QString &p_themeFolder)
|
Theme *ThemeMgr::loadTheme(const QString &p_themeFolder)
|
||||||
@ -211,6 +212,14 @@ QPixmap ThemeMgr::getThemePreview(const QString &p_name) const
|
|||||||
void ThemeMgr::refresh()
|
void ThemeMgr::refresh()
|
||||||
{
|
{
|
||||||
loadAvailableThemes();
|
loadAvailableThemes();
|
||||||
|
refreshCurrentTheme();
|
||||||
|
}
|
||||||
|
|
||||||
|
void vnotex::ThemeMgr::refreshCurrentTheme()
|
||||||
|
{
|
||||||
|
if (m_currentTheme) {
|
||||||
|
loadCurrentTheme(m_currentTheme->name());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThemeMgr::addWebStylesSearchPath(const QString &p_path)
|
void ThemeMgr::addWebStylesSearchPath(const QString &p_path)
|
||||||
|
@ -60,10 +60,11 @@ namespace vnotex
|
|||||||
|
|
||||||
const ThemeInfo *findTheme(const QString &p_name) const;
|
const ThemeInfo *findTheme(const QString &p_name) const;
|
||||||
|
|
||||||
// Refresh the themes list.
|
// Refresh the themes list and reload current theme.
|
||||||
// Won't affect current theme since we do not support changing theme real time for now.
|
|
||||||
void refresh();
|
void refresh();
|
||||||
|
|
||||||
|
void refreshCurrentTheme();
|
||||||
|
|
||||||
// Return all web stylesheets available, including those from themes and web styles search paths.
|
// Return all web stylesheets available, including those from themes and web styles search paths.
|
||||||
// <DisplayName, FilePath>.
|
// <DisplayName, FilePath>.
|
||||||
QVector<QPair<QString, QString>> getWebStyles() const;
|
QVector<QPair<QString, QString>> getWebStyles() const;
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
<string>public.plain-text</string>
|
<string>public.plain-text</string>
|
||||||
<string>net.daringfireball.markdown</string>
|
<string>net.daringfireball.markdown</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>LSHandlerRank</key>
|
||||||
|
<string>Owner</string>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
@ -25,7 +27,7 @@
|
|||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>3.19</string>
|
<string>3.19</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>3.19.1</string>
|
<string>3.19.2</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Distributed under LGPL-3.0 license. Copyright (c) 2025 app.vnote.fun</string>
|
<string>Distributed under LGPL-3.0 license. Copyright (c) 2025 app.vnote.fun</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
@ -34,6 +36,8 @@
|
|||||||
<string>fun.vnote.vnote</string>
|
<string>fun.vnote.vnote</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.productivity</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.15</string>
|
<string>10.15</string>
|
||||||
<key>NOTE</key>
|
<key>NOTE</key>
|
||||||
|
BIN
src/data/core/logo/icon.iconset/icon_512x512.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/data/core/logo/icon.iconset/icon_512x512@2x.png
Normal file
After Width: | Height: | Size: 26 KiB |
@ -3,7 +3,7 @@
|
|||||||
"metadata" : {
|
"metadata" : {
|
||||||
"//comment": "When releasing new version, please go through the following configs to check if override is needed.",
|
"//comment": "When releasing new version, please go through the following configs to check if override is needed.",
|
||||||
"//Comment": "markdown_editor#override_viewer_resource",
|
"//Comment": "markdown_editor#override_viewer_resource",
|
||||||
"version" : "3.19.1"
|
"version" : "3.19.2"
|
||||||
},
|
},
|
||||||
"core" : {
|
"core" : {
|
||||||
"theme" : "pure",
|
"theme" : "pure",
|
||||||
|
@ -349,6 +349,7 @@
|
|||||||
<file>themes/moonlight/checkbox_unchecked.svg</file>
|
<file>themes/moonlight/checkbox_unchecked.svg</file>
|
||||||
<file>themes/moonlight/checkbox_unchecked_disabled.svg</file>
|
<file>themes/moonlight/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/moonlight/close.svg</file>
|
<file>themes/moonlight/close.svg</file>
|
||||||
|
<file>themes/moonlight/expand_toolbar.svg</file>
|
||||||
<file>themes/moonlight/close_grey.svg</file>
|
<file>themes/moonlight/close_grey.svg</file>
|
||||||
<file>themes/moonlight/cover.png</file>
|
<file>themes/moonlight/cover.png</file>
|
||||||
<file>themes/moonlight/down.svg</file>
|
<file>themes/moonlight/down.svg</file>
|
||||||
@ -381,6 +382,7 @@
|
|||||||
<file>themes/pure/checkbox_unchecked.svg</file>
|
<file>themes/pure/checkbox_unchecked.svg</file>
|
||||||
<file>themes/pure/checkbox_unchecked_disabled.svg</file>
|
<file>themes/pure/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/pure/close.svg</file>
|
<file>themes/pure/close.svg</file>
|
||||||
|
<file>themes/pure/expand_toolbar.svg</file>
|
||||||
<file>themes/pure/close_grey.svg</file>
|
<file>themes/pure/close_grey.svg</file>
|
||||||
<file>themes/pure/cover.png</file>
|
<file>themes/pure/cover.png</file>
|
||||||
<file>themes/pure/down.svg</file>
|
<file>themes/pure/down.svg</file>
|
||||||
@ -413,6 +415,7 @@
|
|||||||
<file>themes/solarized-dark/checkbox_unchecked.svg</file>
|
<file>themes/solarized-dark/checkbox_unchecked.svg</file>
|
||||||
<file>themes/solarized-dark/checkbox_unchecked_disabled.svg</file>
|
<file>themes/solarized-dark/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/solarized-dark/close.svg</file>
|
<file>themes/solarized-dark/close.svg</file>
|
||||||
|
<file>themes/solarized-dark/expand_toolbar.svg</file>
|
||||||
<file>themes/solarized-dark/close_grey.svg</file>
|
<file>themes/solarized-dark/close_grey.svg</file>
|
||||||
<file>themes/solarized-dark/cover.png</file>
|
<file>themes/solarized-dark/cover.png</file>
|
||||||
<file>themes/solarized-dark/down.svg</file>
|
<file>themes/solarized-dark/down.svg</file>
|
||||||
@ -445,6 +448,7 @@
|
|||||||
<file>themes/solarized-light/checkbox_unchecked.svg</file>
|
<file>themes/solarized-light/checkbox_unchecked.svg</file>
|
||||||
<file>themes/solarized-light/checkbox_unchecked_disabled.svg</file>
|
<file>themes/solarized-light/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/solarized-light/close.svg</file>
|
<file>themes/solarized-light/close.svg</file>
|
||||||
|
<file>themes/solarized-light/expand_toolbar.svg</file>
|
||||||
<file>themes/solarized-light/close_grey.svg</file>
|
<file>themes/solarized-light/close_grey.svg</file>
|
||||||
<file>themes/solarized-light/cover.png</file>
|
<file>themes/solarized-light/cover.png</file>
|
||||||
<file>themes/solarized-light/down.svg</file>
|
<file>themes/solarized-light/down.svg</file>
|
||||||
@ -804,6 +808,7 @@
|
|||||||
<file>themes/vscode-dark/checkbox_unchecked.svg</file>
|
<file>themes/vscode-dark/checkbox_unchecked.svg</file>
|
||||||
<file>themes/vscode-dark/checkbox_unchecked_disabled.svg</file>
|
<file>themes/vscode-dark/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/vscode-dark/close.svg</file>
|
<file>themes/vscode-dark/close.svg</file>
|
||||||
|
<file>themes/vscode-dark/expand_toolbar.svg</file>
|
||||||
<file>themes/vscode-dark/close_grey.svg</file>
|
<file>themes/vscode-dark/close_grey.svg</file>
|
||||||
<file>themes/vscode-dark/cover.png</file>
|
<file>themes/vscode-dark/cover.png</file>
|
||||||
<file>themes/vscode-dark/down.svg</file>
|
<file>themes/vscode-dark/down.svg</file>
|
||||||
@ -837,6 +842,7 @@
|
|||||||
<file>themes/vue-light/checkbox_unchecked.svg</file>
|
<file>themes/vue-light/checkbox_unchecked.svg</file>
|
||||||
<file>themes/vue-light/checkbox_unchecked_disabled.svg</file>
|
<file>themes/vue-light/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/vue-light/close.svg</file>
|
<file>themes/vue-light/close.svg</file>
|
||||||
|
<file>themes/vue-light/expand_toolbar.svg</file>
|
||||||
<file>themes/vue-light/close_grey.svg</file>
|
<file>themes/vue-light/close_grey.svg</file>
|
||||||
<file>themes/vue-light/cover.png</file>
|
<file>themes/vue-light/cover.png</file>
|
||||||
<file>themes/vue-light/down.svg</file>
|
<file>themes/vue-light/down.svg</file>
|
||||||
@ -869,6 +875,7 @@
|
|||||||
<file>themes/vue-dark/checkbox_unchecked.svg</file>
|
<file>themes/vue-dark/checkbox_unchecked.svg</file>
|
||||||
<file>themes/vue-dark/checkbox_unchecked_disabled.svg</file>
|
<file>themes/vue-dark/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/vue-dark/close.svg</file>
|
<file>themes/vue-dark/close.svg</file>
|
||||||
|
<file>themes/vue-dark/expand_toolbar.svg</file>
|
||||||
<file>themes/vue-dark/close_grey.svg</file>
|
<file>themes/vue-dark/close_grey.svg</file>
|
||||||
<file>themes/vue-dark/cover.png</file>
|
<file>themes/vue-dark/cover.png</file>
|
||||||
<file>themes/vue-dark/down.svg</file>
|
<file>themes/vue-dark/down.svg</file>
|
||||||
@ -905,6 +912,7 @@
|
|||||||
<file>themes/vx-idea/checkbox_unchecked.svg</file>
|
<file>themes/vx-idea/checkbox_unchecked.svg</file>
|
||||||
<file>themes/vx-idea/checkbox_unchecked_disabled.svg</file>
|
<file>themes/vx-idea/checkbox_unchecked_disabled.svg</file>
|
||||||
<file>themes/vx-idea/close.svg</file>
|
<file>themes/vx-idea/close.svg</file>
|
||||||
|
<file>themes/vx-idea/expand_toolbar.svg</file>
|
||||||
<file>themes/vx-idea/close_grey.svg</file>
|
<file>themes/vx-idea/close_grey.svg</file>
|
||||||
<file>themes/vx-idea/cover.png</file>
|
<file>themes/vx-idea/cover.png</file>
|
||||||
<file>themes/vx-idea/down.svg</file>
|
<file>themes/vx-idea/down.svg</file>
|
||||||
|
1
src/data/extra/themes/moonlight/expand_toolbar.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#9EA5B4"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#9EA5B4"></path></svg>
|
After Width: | Height: | Size: 891 B |
@ -147,13 +147,16 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
background-color: @widgets#qtoolbar#extension#bg;
|
qproperty-icon: url(expand_toolbar.svg);
|
||||||
margin: 30px;
|
background-color: @widgets#qtoolbutton#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbar#extension#hover#bg;
|
background-color: @widgets#qtoolbutton#hover#bg;
|
||||||
margin: 30px;
|
}
|
||||||
|
|
||||||
|
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
||||||
|
background-color: @widgets#qtoolbutton#pressed#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
|
1
src/data/extra/themes/pure/expand_toolbar.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#222222"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#222222"></path></svg>
|
After Width: | Height: | Size: 891 B |
@ -166,13 +166,16 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
background-color: @widgets#qtoolbar#extension#bg;
|
qproperty-icon: url(expand_toolbar.svg);
|
||||||
margin: 30px;
|
background-color: @widgets#qtoolbutton#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbar#extension#hover#bg;
|
background-color: @widgets#qtoolbutton#hover#bg;
|
||||||
margin: 30px;
|
}
|
||||||
|
|
||||||
|
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
||||||
|
background-color: @widgets#qtoolbutton#pressed#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
|
1
src/data/extra/themes/solarized-dark/expand_toolbar.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#9EA5B4"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#9EA5B4"></path></svg>
|
After Width: | Height: | Size: 891 B |
@ -143,13 +143,16 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
background-color: @widgets#qtoolbar#extension#bg;
|
qproperty-icon: url(expand_toolbar.svg);
|
||||||
margin: 30px;
|
background-color: @widgets#qtoolbutton#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbar#extension#hover#bg;
|
background-color: @widgets#qtoolbutton#hover#bg;
|
||||||
margin: 30px;
|
}
|
||||||
|
|
||||||
|
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
||||||
|
background-color: @widgets#qtoolbutton#pressed#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
|
1
src/data/extra/themes/solarized-light/expand_toolbar.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#9EA5B4"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#9EA5B4"></path></svg>
|
After Width: | Height: | Size: 891 B |
@ -143,13 +143,16 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
background-color: @widgets#qtoolbar#extension#bg;
|
qproperty-icon: url(expand_toolbar.svg);
|
||||||
margin: 30px;
|
background-color: @widgets#qtoolbutton#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbar#extension#hover#bg;
|
background-color: @widgets#qtoolbutton#hover#bg;
|
||||||
margin: 30px;
|
}
|
||||||
|
|
||||||
|
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
||||||
|
background-color: @widgets#qtoolbutton#pressed#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
|
1
src/data/extra/themes/vscode-dark/expand_toolbar.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#9EA5B4"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#9EA5B4"></path></svg>
|
After Width: | Height: | Size: 891 B |
@ -143,13 +143,16 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
background-color: @widgets#qtoolbar#extension#bg;
|
qproperty-icon: url(expand_toolbar.svg);
|
||||||
margin: 30px;
|
background-color: @widgets#qtoolbutton#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbar#extension#hover#bg;
|
background-color: @widgets#qtoolbutton#hover#bg;
|
||||||
margin: 30px;
|
}
|
||||||
|
|
||||||
|
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
||||||
|
background-color: @widgets#qtoolbutton#pressed#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
|
1
src/data/extra/themes/vue-dark/expand_toolbar.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#4d5765"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#4d5765"></path></svg>
|
After Width: | Height: | Size: 891 B |
@ -148,13 +148,16 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
background-color: @widgets#qtoolbar#extension#bg;
|
qproperty-icon: url(expand_toolbar.svg);
|
||||||
margin: 30px;
|
background-color: @widgets#qtoolbutton#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbar#extension#hover#bg;
|
background-color: @widgets#qtoolbutton#hover#bg;
|
||||||
margin: 30px;
|
}
|
||||||
|
|
||||||
|
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
||||||
|
background-color: @widgets#qtoolbutton#pressed#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
|
1
src/data/extra/themes/vue-light/expand_toolbar.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#222222"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#222222"></path></svg>
|
After Width: | Height: | Size: 891 B |
@ -166,13 +166,16 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
background-color: @widgets#qtoolbar#extension#bg;
|
qproperty-icon: url(expand_toolbar.svg);
|
||||||
margin: 30px;
|
background-color: @widgets#qtoolbutton#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbar#extension#hover#bg;
|
background-color: @widgets#qtoolbutton#hover#bg;
|
||||||
margin: 30px;
|
}
|
||||||
|
|
||||||
|
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
||||||
|
background-color: @widgets#qtoolbutton#pressed#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
|
1
src/data/extra/themes/vx-idea/expand_toolbar.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747190112225" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M798.165333 524.501333a42.666667 42.666667 0 0 0-60.330666 0L512 750.336l-225.834667-225.834667a42.666667 42.666667 0 0 0-60.330666 60.330667l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330667z" p-id="2511" fill="#222222"></path><path d="M798.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 0L512 451.669333 286.165333 225.834667a42.666667 42.666667 0 0 0-60.330666 60.330666l256 256a42.666667 42.666667 0 0 0 60.330666 0l256-256a42.666667 42.666667 0 0 0 0-60.330666z" p-id="2512" fill="#222222"></path></svg>
|
After Width: | Height: | Size: 891 B |
@ -167,13 +167,16 @@ QToolBar::separator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button {
|
QToolBarExtension#qt_toolbar_ext_button {
|
||||||
background-color: @widgets#qtoolbar#extension#bg;
|
qproperty-icon: url(expand_toolbar.svg);
|
||||||
margin: 30px;
|
background-color: @widgets#qtoolbutton#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolBarExtension#qt_toolbar_ext_button:hover {
|
QToolBarExtension#qt_toolbar_ext_button:hover {
|
||||||
background-color: @widgets#qtoolbar#extension#hover#bg;
|
background-color: @widgets#qtoolbutton#hover#bg;
|
||||||
margin: 30px;
|
}
|
||||||
|
|
||||||
|
QToolBarExtension#qt_toolbar_ext_button:pressed {
|
||||||
|
background-color: @widgets#qtoolbutton#pressed#bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QToolButton */
|
/* QToolButton */
|
||||||
|
@ -161,6 +161,11 @@ int main(int argc, char *argv[])
|
|||||||
auto style = VNoteX::getInst().getThemeMgr().fetchQtStyleSheet();
|
auto style = VNoteX::getInst().getThemeMgr().fetchQtStyleSheet();
|
||||||
if (!style.isEmpty()) {
|
if (!style.isEmpty()) {
|
||||||
app.setStyleSheet(style);
|
app.setStyleSheet(style);
|
||||||
|
// Set up hot-reload for the theme folder if enabled via command line
|
||||||
|
if (cmdOptions.m_watchThemes) {
|
||||||
|
const auto themeFolderPath = VNoteX::getInst().getThemeMgr().getCurrentTheme().getThemeFolder();
|
||||||
|
app.watchThemeFolder(themeFolderPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|