diff --git a/src/UI/AboutWindow.cc b/src/UI/AboutWindow.cc index 9027ca32d770580a7aff606553f3b83d233e2b38..42ba502a816994dab1408f52c83d6e5638944622 100644 --- a/src/UI/AboutWindow.cc +++ b/src/UI/AboutWindow.cc @@ -32,6 +32,7 @@ static const char *libContent = " <ul>" " <li><a href=https://github.com/tonsky/FiraCode>FiraCode</a> © <i>Nikita Prokopov. (OFL-1.1)</i></li>" " <li><a href=https://fonts.google.com/specimen/Noto+Sans>NotoSans</a> © <i>Google. (APACHE-2.0)</i>" + " <li><a href=https://github.com/KDE/breeze-icons>The breeze icon theme</a> © <i>The KDE Visual Design Group. (LGPL-V3)</i></li>" " <li><a href=https://github.com/ColinDuquesnoy/QDarkStyleSheet>QDarkStyleSheet</a> © <i>Colin Duquesnoy, Daniel Cosmo Pizetta. (MIT + CCAI-4.0)</i></li>" " </ul>" "</body>"; diff --git a/src/UI/MainWindow.cc b/src/UI/MainWindow.cc index 02dc1218745a226a4ed6481cc10ee1f8e14f4bae..2353683ba3f936113c4e1ab3ffe39e7644c4fd3d 100644 --- a/src/UI/MainWindow.cc +++ b/src/UI/MainWindow.cc @@ -32,7 +32,7 @@ menu##Menu->addAction(method##Act); \ connect(method##Act, &QAction::triggered, this, &MainWindow::method); -#define ACTION_ADD_ICON(action, icon) action##Act->setIcon(QIcon::fromTheme(icon)); +#define ACTION_ADD_ICON(action, icon) action##Act->setIcon(QIcon(icon)); #define ACTION_ADD_SHORTCUT(action, shortcut) action##Act->setShortcut(shortcut); @@ -66,11 +66,11 @@ MainWindow::MainWindow() noexcept DCL_ACTION(openDialogHelp, "&About", "Open the help dialog", help); - ACTION_ADD_ICON(newDocument, "document-new"); - ACTION_ADD_ICON(openDocument, "document-open"); - ACTION_ADD_ICON(saveFile, "document-save"); - ACTION_ADD_ICON(saveFileAs, "document-save-as"); - ACTION_ADD_ICON(openDialogHelp, "help-about"); + ACTION_ADD_ICON(newDocument, VIVY_ICON_NEW); + ACTION_ADD_ICON(openDocument, VIVY_ICON_OPEN); + ACTION_ADD_ICON(saveFile, VIVY_ICON_SAVE); + ACTION_ADD_ICON(saveFileAs, VIVY_ICON_SAVE_AS); + ACTION_ADD_ICON(openDialogHelp, VIVY_ICON_ABOUT); ACTION_ADD_SHORTCUT(newDocument, QKeySequence::New); ACTION_ADD_SHORTCUT(openDocument, QKeySequence::Open); diff --git a/src/VivyApplication.hh b/src/VivyApplication.hh index cdae52b44d8944f17418d9a8d476b30528a6bf0f..86c5f89dd2b8cda814994901d3b8c01cae27f06f 100644 --- a/src/VivyApplication.hh +++ b/src/VivyApplication.hh @@ -6,7 +6,13 @@ #define vivyApp static_cast<VivyApplication *>(QApplication::instance()) -#define VIVY_ICON_APP ":icons/vivy.png" +// Only support dark theme for now +#define VIVY_ICON_APP ":icons/vivy.png" +#define VIVY_ICON_OPEN ":icons/dark/document-open.svg" +#define VIVY_ICON_NEW ":icons/dark/document-new.svg" +#define VIVY_ICON_SAVE ":icons/dark/document-save.svg" +#define VIVY_ICON_SAVE_AS ":icons/dark/document-save-as.svg" +#define VIVY_ICON_ABOUT ":icons/dark/help-about.svg" #include <QApplication> #include <QPixmap> diff --git a/utils/rsc/VivyRessources.qrc b/utils/rsc/VivyRessources.qrc index 99e577f4b595212d033480c4f648766a0c5a6760..bf6947e9a51a40b92532f530f974d5603fc2a576 100644 --- a/utils/rsc/VivyRessources.qrc +++ b/utils/rsc/VivyRessources.qrc @@ -18,6 +18,22 @@ <file>licence/CCAI-4.0</file> </qresource> +<!-- Breeze icons, LGPL-3.0 Licence --> +<qresource prefix="icons/dark"> + <file alias="document-new.svg">icons/breeze-dark/document-new.svg</file> + <file alias="document-open.svg">icons/breeze-dark/document-open.svg</file> + <file alias="document-save.svg">icons/breeze-dark/document-save.svg</file> + <file alias="document-save-as.svg">icons/breeze-dark/document-save-as.svg</file> + <file alias="help-about.svg">icons/breeze-dark/help-about.svg</file> +</qresource> +<qresource prefix="icons/light"> + <file alias="document-new.svg">icons/breeze-light/document-new.svg</file> + <file alias="document-open.svg">icons/breeze-light/document-open.svg</file> + <file alias="document-save.svg">icons/breeze-light/document-save.svg</file> + <file alias="document-save-as.svg">icons/breeze-light/document-save-as.svg</file> + <file alias="help-about.svg">icons/breeze-light/help-about.svg</file> +</qresource> + <!-- QDarkStyle style sheet, MIT Licence --> <qresource prefix="qdarkstyle/dark"> <file alias="style.qss">qdarkstyle_dark.qss</file> </qresource> <qresource prefix="qdarkstyle/light"> <file alias="style.qss">qdarkstyle_light.qss</file> </qresource> diff --git a/utils/rsc/icons/breeze-dark/document-new.svg b/utils/rsc/icons/breeze-dark/document-new.svg new file mode 100644 index 0000000000000000000000000000000000000000..316017273c750d6e786f49e2a7ce86d8376fff58 --- /dev/null +++ b/utils/rsc/icons/breeze-dark/document-new.svg @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 3 2 L 3 14 L 8 14 L 8 13 L 4 13 L 4 3 L 9 3 L 9 6 L 12 6 L 12 9 L 13 9 L 13 6 L 13 5 L 10 2 L 9 2 L 3 2 z M 10 9 L 10 11 L 8 11 L 8 12 L 10 12 L 10 14 L 11 14 L 11 12 L 13 12 L 13 11 L 11 11 L 11 9 L 10 9 z " + class="ColorScheme-Text" + /> +</svg> diff --git a/utils/rsc/icons/breeze-dark/document-open.svg b/utils/rsc/icons/breeze-dark/document-open.svg new file mode 100644 index 0000000000000000000000000000000000000000..4e0f9c470daab722eceb8f75850c31eec853ece4 --- /dev/null +++ b/utils/rsc/icons/breeze-dark/document-open.svg @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 2 2 L 2 3 L 2 6 L 2 7 L 2 13 L 2 14 L 14 14 L 14 13 L 14 6 L 14 5 L 14 4 L 9.0078125 4 L 7.0078125 2 L 7 2.0078125 L 7 2 L 3 2 L 2 2 z M 3 3 L 6.5917969 3 L 7.59375 4 L 7 4 L 7 4.0078125 L 6.9921875 4 L 4.9921875 6 L 3 6 L 3 3 z M 3 7 L 13 7 L 13 13 L 3 13 L 3 7 z " + class="ColorScheme-Text" + /> +</svg> diff --git a/utils/rsc/icons/breeze-dark/document-save-as.svg b/utils/rsc/icons/breeze-dark/document-save-as.svg new file mode 100644 index 0000000000000000000000000000000000000000..7aa06852a1c22ec900a4b53132ee2693bc0310c5 --- /dev/null +++ b/utils/rsc/icons/breeze-dark/document-save-as.svg @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 2 2 L 2 14 L 3 14 L 4 14 L 7 14 L 7 13 L 6 13 L 5 13 L 5 10 L 6 10 L 7 10 L 8 10 L 8 9 L 7 9 L 5 9 L 3.96875 9 L 3.96875 13 L 3 13 L 3 3 L 4 3 L 5 3 L 5 6 L 5 7 L 7 7 L 11 7 L 11 6 L 11 3 L 11.28125 3 L 13 4.71875 L 13 5 L 13 7 L 14 7 L 14 4.28125 L 11.71875 2 L 11.6875 2 L 11 2 L 4 2 L 3 2 L 2 2 z M 6 3 L 7.90625 3 L 7.90625 6 L 6 6 L 6 3 z M 12 8 L 11 9 L 10 10 L 8 12 L 8 13 L 8 14 L 10 14 L 11 13 L 12 12 L 13 11 L 14 10 L 12 8 z M 11.689453 9.6894531 L 12.28125 10.28125 L 10.59375 11.96875 L 10.59375 11.984375 L 9.3125 13.28125 L 8.71875 12.6875 L 11.689453 9.6894531 z " + class="ColorScheme-Text" + /> +</svg> diff --git a/utils/rsc/icons/breeze-dark/document-save.svg b/utils/rsc/icons/breeze-dark/document-save.svg new file mode 100644 index 0000000000000000000000000000000000000000..1484379e82b5351c9a7cd029fd0b1640dd54e64d --- /dev/null +++ b/utils/rsc/icons/breeze-dark/document-save.svg @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 2 2 L 2 14 L 3 14 L 4 14 L 10 14 L 11 14 L 12 14 L 14 14 L 14 4.28125 L 11.71875 2 L 11.6875 2 L 11 2 L 4 2 L 3 2 L 2 2 z M 3 3 L 4 3 L 5 3 L 5 6 L 5 7 L 11 7 L 11 6 L 11 3 L 11.28125 3 L 13 4.71875 L 13 5 L 13 13 L 12 13 L 12 9 L 11 9 L 5 9 L 3.96875 9 L 3.96875 13 L 3 13 L 3 3 z M 6 3 L 7.90625 3 L 7.90625 6 L 6 6 L 6 3 z M 5 10 L 6 10 L 10 10 L 11 10 L 11 13 L 10 13 L 6 13 L 5 13 L 5 10 z " + class="ColorScheme-Text" + /> +</svg> diff --git a/utils/rsc/icons/breeze-dark/help-about.svg b/utils/rsc/icons/breeze-dark/help-about.svg new file mode 100644 index 0000000000000000000000000000000000000000..856d1b2b8ba2d50ec2d0c357000992045d106cc8 --- /dev/null +++ b/utils/rsc/icons/breeze-dark/help-about.svg @@ -0,0 +1,12 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#eff0f1; + } + </style> + <g class="ColorScheme-Text" fill="currentColor" fill-rule="evenodd"> + <path d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0 -6-6zm0 1a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5-5 5 5 0 0 1 5-5z"/> + <path d="m7 4h2v2h-2z"/> + <path d="m7 7h2v5h-2z"/> + </g> +</svg> diff --git a/utils/rsc/icons/breeze-light/document-new.svg b/utils/rsc/icons/breeze-light/document-new.svg new file mode 100644 index 0000000000000000000000000000000000000000..6434a18e6e514b3c09b3c4c1b82b4594669207ca --- /dev/null +++ b/utils/rsc/icons/breeze-light/document-new.svg @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#232629; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 3 2 L 3 14 L 8 14 L 8 13 L 4 13 L 4 3 L 9 3 L 9 6 L 12 6 L 12 9 L 13 9 L 13 6 L 13 5 L 10 2 L 9 2 L 3 2 z M 10 9 L 10 11 L 8 11 L 8 12 L 10 12 L 10 14 L 11 14 L 11 12 L 13 12 L 13 11 L 11 11 L 11 9 L 10 9 z " + class="ColorScheme-Text" + /> +</svg> diff --git a/utils/rsc/icons/breeze-light/document-open.svg b/utils/rsc/icons/breeze-light/document-open.svg new file mode 100644 index 0000000000000000000000000000000000000000..4d2b838970181d6ee4f841e07d6cba3b8ddcbb14 --- /dev/null +++ b/utils/rsc/icons/breeze-light/document-open.svg @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#232629; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 2 2 L 2 3 L 2 6 L 2 7 L 2 13 L 2 14 L 14 14 L 14 13 L 14 6 L 14 5 L 14 4 L 9.0078125 4 L 7.0078125 2 L 7 2.0078125 L 7 2 L 3 2 L 2 2 z M 3 3 L 6.5917969 3 L 7.59375 4 L 7 4 L 7 4.0078125 L 6.9921875 4 L 4.9921875 6 L 3 6 L 3 3 z M 3 7 L 13 7 L 13 13 L 3 13 L 3 7 z " + class="ColorScheme-Text" + /> +</svg> diff --git a/utils/rsc/icons/breeze-light/document-save-as.svg b/utils/rsc/icons/breeze-light/document-save-as.svg new file mode 100644 index 0000000000000000000000000000000000000000..b8ad9683168a8958b0b45f9595b072b6844bb8b8 --- /dev/null +++ b/utils/rsc/icons/breeze-light/document-save-as.svg @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#232629; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 2 2 L 2 14 L 3 14 L 4 14 L 7 14 L 7 13 L 6 13 L 5 13 L 5 10 L 6 10 L 7 10 L 8 10 L 8 9 L 7 9 L 5 9 L 3.96875 9 L 3.96875 13 L 3 13 L 3 3 L 4 3 L 5 3 L 5 6 L 5 7 L 7 7 L 11 7 L 11 6 L 11 3 L 11.28125 3 L 13 4.71875 L 13 5 L 13 7 L 14 7 L 14 4.28125 L 11.71875 2 L 11.6875 2 L 11 2 L 4 2 L 3 2 L 2 2 z M 6 3 L 7.90625 3 L 7.90625 6 L 6 6 L 6 3 z M 12 8 L 11 9 L 10 10 L 8 12 L 8 13 L 8 14 L 10 14 L 11 13 L 12 12 L 13 11 L 14 10 L 12 8 z M 11.689453 9.6894531 L 12.28125 10.28125 L 10.59375 11.96875 L 10.59375 11.984375 L 9.3125 13.28125 L 8.71875 12.6875 L 11.689453 9.6894531 z " + class="ColorScheme-Text" + /> +</svg> diff --git a/utils/rsc/icons/breeze-light/document-save.svg b/utils/rsc/icons/breeze-light/document-save.svg new file mode 100644 index 0000000000000000000000000000000000000000..cd2db5adb0765ae7a3fd8c7eee78bbd1f6fafe87 --- /dev/null +++ b/utils/rsc/icons/breeze-light/document-save.svg @@ -0,0 +1,13 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> + <defs id="defs3051"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#232629; + } + </style> + </defs> + <path style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 2 2 L 2 14 L 3 14 L 4 14 L 10 14 L 11 14 L 12 14 L 14 14 L 14 4.28125 L 11.71875 2 L 11.6875 2 L 11 2 L 4 2 L 3 2 L 2 2 z M 3 3 L 4 3 L 5 3 L 5 6 L 5 7 L 11 7 L 11 6 L 11 3 L 11.28125 3 L 13 4.71875 L 13 5 L 13 13 L 12 13 L 12 9 L 11 9 L 5 9 L 3.96875 9 L 3.96875 13 L 3 13 L 3 3 z M 6 3 L 7.90625 3 L 7.90625 6 L 6 6 L 6 3 z M 5 10 L 6 10 L 10 10 L 11 10 L 11 13 L 10 13 L 6 13 L 5 13 L 5 10 z " + class="ColorScheme-Text" + /> +</svg> diff --git a/utils/rsc/icons/breeze-light/help-about.svg b/utils/rsc/icons/breeze-light/help-about.svg new file mode 100644 index 0000000000000000000000000000000000000000..ea1dc02cdb0f4ddba638dd3b881ceaf139e4d4c6 --- /dev/null +++ b/utils/rsc/icons/breeze-light/help-about.svg @@ -0,0 +1,12 @@ +<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> + <style type="text/css" id="current-color-scheme"> + .ColorScheme-Text { + color:#232629; + } + </style> + <g class="ColorScheme-Text" fill="currentColor" fill-rule="evenodd"> + <path d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0 -6-6zm0 1a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5-5 5 5 0 0 1 5-5z"/> + <path d="m7 4h2v2h-2z"/> + <path d="m7 7h2v5h-2z"/> + </g> +</svg>