summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-08-30 07:09:28 +0300
committeraqua <aqua@iserlohn-fortress.net>2022-09-01 15:33:31 +0300
commit99d1f56d99470fd2dd4f92b7d34cf430429c18c4 (patch)
tree33a41c0e1b692aad7f243b7cc06f71a96c7df27a
parentSingleApplication: switch to 3.3.4 release (diff)
downloadrekonq-99d1f56d99470fd2dd4f92b7d34cf430429c18c4.tar.xz
Add tabler icon theme
-rw-r--r--.gitmodules3
-rw-r--r--CMakeLists.txt2
-rw-r--r--include/rsettings.hpp2
-rw-r--r--src/application.cpp4
-rw-r--r--third-party/resources.qrc31
m---------third-party/tabler-icons0
-rw-r--r--third-party/tabler-icons.theme13
7 files changed, 53 insertions, 2 deletions
diff --git a/.gitmodules b/.gitmodules
index 795c96ab..0481e27b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "third-party/SingleApplication"]
path = third-party/SingleApplication
url = https://bitbucket.org/celestriad/singleapplication.git
+[submodule "third-party/tabler-icons"]
+ path = third-party/tabler-icons
+ url = https://bitbucket.org/celestriad/tabler-icons.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e1a43b3..9c769cbf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,7 +112,7 @@ feature_summary(WHAT ALL)
add_subdirectory(plugins/webengine)
add_subdirectory(src)
-add_executable(rekonq ${rekonq_SRCS}
+add_executable(rekonq ${rekonq_SRCS} third-party/resources.qrc
include/rview.hpp)
target_include_directories(rekonq PRIVATE src)
target_link_libraries(rekonq
diff --git a/include/rsettings.hpp b/include/rsettings.hpp
index 5c1ba9d8..9f0fc4d0 100644
--- a/include/rsettings.hpp
+++ b/include/rsettings.hpp
@@ -23,7 +23,7 @@ public:
virtual void endGroup() = 0;
virtual void setValue(const QString &key, const QVariant &value) = 0;
- [[nodiscard]] virtual QVariant value(const QString &key, const QVariant &defaultValue) const = 0;
+ [[nodiscard]] virtual QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const = 0;
[[nodiscard]] virtual QString filePath() const = 0;
diff --git a/src/application.cpp b/src/application.cpp
index a2031de4..228b3d38 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -51,6 +51,10 @@ Application::Application(int &argc, char *argv[]) : SingleApplication(argc, argv
}
// setWindowIcon(KIcon("rekonq"));
+ if (const auto iconTheme = m_settings->value("IconTheme"); iconTheme.isValid()) {
+ spdlog::info("Set icon theme {}", qUtf8Printable(iconTheme.toString()));
+ QIcon::setThemeName(iconTheme.toString());
+ }
// just create History Manager...
// HistoryManager::self();
diff --git a/third-party/resources.qrc b/third-party/resources.qrc
new file mode 100644
index 00000000..f692daee
--- /dev/null
+++ b/third-party/resources.qrc
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes'?>
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/icons/tabler">
+ <file alias="index.theme">tabler-icons.theme</file>
+ </qresource>
+ <qresource prefix="/icons/tabler/actions/scalable">
+ <file alias="edit-clear.svg">tabler-icons/icons/backspace.svg</file>
+ <file alias="document-new.svg">tabler-icons/icons/browser-plus.svg</file>
+ <file alias="go-previous.svg">tabler-icons/icons/chevron-left.svg</file>
+ <file alias="go-next.svg">tabler-icons/icons/chevron-right.svg</file>
+ <file alias="go-jump.svg">tabler-icons/icons/chevrons-right.svg</file>
+ <file alias="folder-new.svg">tabler-icons/icons/folder-plus.svg</file>
+ <file alias="go-home.svg">tabler-icons/icons/home.svg</file>
+ <file alias="view-refresh.svg">tabler-icons/icons/refresh.svg</file>
+ <file alias="bookmark-new.svg">tabler-icons/icons/star.svg</file>
+ <file alias="edit-delete.svg">tabler-icons/icons/trash.svg</file>
+ <file alias="window-close.svg">tabler-icons/icons/x.svg</file>
+ </qresource>
+ <qresource prefix="/icons/tabler/places/scalable">
+ <file alias="bookmark.svg">tabler-icons/icons/bookmark.svg</file>
+ <file alias="bookmarks.svg">tabler-icons/icons/bookmarks.svg</file>
+ <file alias="browser.svg">tabler-icons/icons/browser.svg</file>
+ <file alias="downloads.svg">tabler-icons/icons/download.svg</file>
+ <file alias="folder.svg">tabler-icons/icons/folder.svg</file>
+ <file alias="shortcuts.svg">tabler-icons/icons/keyboard.svg</file>
+ <file alias="plugins.svg">tabler-icons/icons/puzzle.svg</file>
+ <file alias="preferences.svg">tabler-icons/icons/settings.svg</file>
+ <file alias="plugin.svg">tabler-icons/icons/tool.svg</file>
+ </qresource>
+</RCC>
diff --git a/third-party/tabler-icons b/third-party/tabler-icons
new file mode 160000
+Subproject 7c5431f7d61a0b0ebeac01e5a92af8774a6b938
diff --git a/third-party/tabler-icons.theme b/third-party/tabler-icons.theme
new file mode 100644
index 00000000..88941053
--- /dev/null
+++ b/third-party/tabler-icons.theme
@@ -0,0 +1,13 @@
+[Icon Theme]
+Name=tabler
+Comment=A set of MIT-licensed icons
+
+[actions/scalable]
+Size=24
+Context=Actions
+Type=Scalable
+
+[places/scalable]
+Size=24
+Context=Places
+Type=Scalable