client: Switch infobar dialog-* icons to emblem-*
authorShane Synan <digitalcircuit36939@gmail.com>
Mon, 20 Jul 2020 05:27:30 +0000 (01:27 -0400)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 28 Nov 2020 12:42:31 +0000 (13:42 +0100)
Switch the icons representing whether a feature is supported or not
from the "dialog-*" set of icons, which can be hard to distinguish at
small sizes, to the "emblem-*" set of icons, which are much more
distinguishable, and actually designed as emblems.

This means older icon sets such as Ubuntu's Humanity will no longer
have a custom icon available, but the Breeze icons aren't too far out
of place.

Oxygen does not provide these icons, so include a fallback to the
previous icon names.

13 files changed:
3rdparty/icons/breeze-dark/emblems/16/emblem-information.svg [new file with mode: 0644]
3rdparty/icons/breeze-dark/emblems/16/emblem-question.svg [new file with mode: 0644]
3rdparty/icons/breeze-dark/emblems/16/emblem-success.svg [new file with mode: 0644]
3rdparty/icons/breeze-dark/emblems/16/emblem-unavailable.svg [new file with mode: 0644]
3rdparty/icons/breeze/emblems/16/emblem-information.svg [new file with mode: 0644]
3rdparty/icons/breeze/emblems/16/emblem-question.svg [new file with mode: 0644]
3rdparty/icons/breeze/emblems/16/emblem-success.svg [new file with mode: 0644]
3rdparty/icons/breeze/emblems/16/emblem-unavailable.svg [new file with mode: 0644]
src/qtui/coreinfodlg.cpp
src/qtui/settingspages/corehighlightsettingspage.cpp
src/qtui/settingspages/highlightsettingspage.cpp
src/qtui/settingspages/networkssettingspage.cpp
src/qtui/settingspages/networkssettingspage.h

diff --git a/3rdparty/icons/breeze-dark/emblems/16/emblem-information.svg b/3rdparty/icons/breeze-dark/emblems/16/emblem-information.svg
new file mode 100644 (file)
index 0000000..e25606d
--- /dev/null
@@ -0,0 +1,15 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
+    <style
+        type="text/css"
+        id="current-color-scheme">
+        .ColorScheme-Highlight {
+            color:#3daee9;
+        }
+        .ColorScheme-Text {
+            color:#eff0f1;
+        }
+    </style>
+    <rect style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Highlight" height="16" rx="2" width="16"/>
+    <path style="fill:currentColor;fill-opacity:0.6;stroke:none" class="ColorScheme-Text" d="M2 0C.892 0 0 .892 0 2v12c0 1.108.892 2 2 2h12c1.108 0 2-.892 2-2V2c0-1.108-.892-2-2-2zm0 1h12c.554 0 1 .446 1 1v12c0 .554-.446 1-1 1H2c-.554 0-1-.446-1-1V2c0-.554.446-1 1-1z"/>
+    <path d="M7 2v2h2V2zm0 3v9h2V5z" fill="#fff"/>
+</svg>
diff --git a/3rdparty/icons/breeze-dark/emblems/16/emblem-question.svg b/3rdparty/icons/breeze-dark/emblems/16/emblem-question.svg
new file mode 100644 (file)
index 0000000..293bd28
--- /dev/null
@@ -0,0 +1,12 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
+    <style
+        type="text/css"
+        id="current-color-scheme">
+        .ColorScheme-Text {
+            color:#eff0f1;
+        }
+    </style>
+    <rect fill="#9b59b6" height="16" rx="2" width="16"/>
+    <path d="M2 0C.892 0 0 .892 0 2v12c0 1.108.892 2 2 2h12c1.108 0 2-.892 2-2V2c0-1.108-.892-2-2-2zm0 1h12c.554 0 1 .446 1 1v12c0 .554-.446 1-1 1H2c-.554 0-1-.446-1-1V2c0-.554.446-1 1-1z" style="fill:currentColor;fill-opacity:0.6;stroke:none" class="ColorScheme-Text"/>
+    <path d="M8 2a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2 2 2 0 0 1-2 2H7v3h2V9.867A4 4 0 0 0 12 6a4 4 0 0 0-4-4zM7 12v2h2v-2z" fill="#fff"/>
+</svg>
diff --git a/3rdparty/icons/breeze-dark/emblems/16/emblem-success.svg b/3rdparty/icons/breeze-dark/emblems/16/emblem-success.svg
new file mode 100644 (file)
index 0000000..f52f791
--- /dev/null
@@ -0,0 +1,15 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
+    <style
+        type="text/css"
+        id="current-color-scheme">
+        .ColorScheme-PositiveText {
+            color:#27ae60;
+        }
+        .ColorScheme-Text {
+            color:#eff0f1;
+        }
+    </style>
+    <rect style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-PositiveText" height="16" rx="2" width="16"/>
+    <path style="fill:currentColor;fill-opacity:0.6;stroke:none" class="ColorScheme-Text" d="M2 0C.892 0 0 .892 0 2v12c0 1.108.892 2 2 2h12c1.108 0 2-.892 2-2V2c0-1.108-.892-2-2-2zm0 1h12c.554 0 1 .446 1 1v12c0 .554-.446 1-1 1H2c-.554 0-1-.446-1-1V2c0-.554.446-1 1-1z"/>
+    <path d="M12.586 3.586L6.5 9.672 3.414 6.586 2 8l4.5 4.5L14 5z" fill="#fff"/>
+</svg>
diff --git a/3rdparty/icons/breeze-dark/emblems/16/emblem-unavailable.svg b/3rdparty/icons/breeze-dark/emblems/16/emblem-unavailable.svg
new file mode 100644 (file)
index 0000000..77683c9
--- /dev/null
@@ -0,0 +1,12 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
+    <style
+        type="text/css"
+        id="current-color-scheme">
+        .ColorScheme-Text {
+            color:#eff0f1;
+        }
+    </style>
+    <rect fill="#7f8c8d" height="16" rx="2" width="16"/>
+    <path style="fill:currentColor;fill-opacity:0.6;stroke:none" class="ColorScheme-Text" d="M2 0C.892 0 0 .892 0 2v12c0 1.108.892 2 2 2h12c1.108 0 2-.892 2-2V2c0-1.108-.892-2-2-2zm0 1h12c.554 0 1 .446 1 1v12c0 .554-.446 1-1 1H2c-.554 0-1-.446-1-1V2c0-.554.446-1 1-1z"/>
+    <path d="M3.414 2L2 3.414 6.586 8 2 12.586 3.414 14 8 9.414 12.586 14 14 12.586 9.414 8 14 3.414 12.586 2 8 6.586z" fill="#fff"/>
+</svg>
diff --git a/3rdparty/icons/breeze/emblems/16/emblem-information.svg b/3rdparty/icons/breeze/emblems/16/emblem-information.svg
new file mode 100644 (file)
index 0000000..aa85e54
--- /dev/null
@@ -0,0 +1,15 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
+    <style
+        type="text/css"
+        id="current-color-scheme">
+        .ColorScheme-Highlight {
+            color:#3daee9;
+        }
+        .ColorScheme-Text {
+            color:#232629;
+        }
+    </style>
+    <rect style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Highlight" height="16" rx="2" width="16"/>
+    <path style="fill:currentColor;fill-opacity:0.6;stroke:none" class="ColorScheme-Text" d="M2 0C.892 0 0 .892 0 2v12c0 1.108.892 2 2 2h12c1.108 0 2-.892 2-2V2c0-1.108-.892-2-2-2zm0 1h12c.554 0 1 .446 1 1v12c0 .554-.446 1-1 1H2c-.554 0-1-.446-1-1V2c0-.554.446-1 1-1z"/>
+    <path d="M7 2v2h2V2zm0 3v9h2V5z" fill="#fff"/>
+</svg>
diff --git a/3rdparty/icons/breeze/emblems/16/emblem-question.svg b/3rdparty/icons/breeze/emblems/16/emblem-question.svg
new file mode 100644 (file)
index 0000000..bc2c217
--- /dev/null
@@ -0,0 +1,12 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
+    <style
+        type="text/css"
+        id="current-color-scheme">
+        .ColorScheme-Text {
+            color:#232629;
+        }
+    </style>
+    <rect fill="#9b59b6" height="16" rx="2" width="16"/>
+    <path d="M2 0C.892 0 0 .892 0 2v12c0 1.108.892 2 2 2h12c1.108 0 2-.892 2-2V2c0-1.108-.892-2-2-2zm0 1h12c.554 0 1 .446 1 1v12c0 .554-.446 1-1 1H2c-.554 0-1-.446-1-1V2c0-.554.446-1 1-1z" style="fill:currentColor;fill-opacity:0.6;stroke:none" class="ColorScheme-Text"/>
+    <path d="M8 2a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2 2 2 0 0 1-2 2H7v3h2V9.867A4 4 0 0 0 12 6a4 4 0 0 0-4-4zM7 12v2h2v-2z" fill="#fff"/>
+</svg>
diff --git a/3rdparty/icons/breeze/emblems/16/emblem-success.svg b/3rdparty/icons/breeze/emblems/16/emblem-success.svg
new file mode 100644 (file)
index 0000000..b466e82
--- /dev/null
@@ -0,0 +1,15 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
+    <style
+        type="text/css"
+        id="current-color-scheme">
+        .ColorScheme-PositiveText {
+            color:#27ae60;
+        }
+        .ColorScheme-Text {
+            color:#232629;
+        }
+    </style>
+    <rect style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-PositiveText" height="16" rx="2" width="16"/>
+    <path style="fill:currentColor;fill-opacity:0.6;stroke:none" class="ColorScheme-Text" d="M2 0C.892 0 0 .892 0 2v12c0 1.108.892 2 2 2h12c1.108 0 2-.892 2-2V2c0-1.108-.892-2-2-2zm0 1h12c.554 0 1 .446 1 1v12c0 .554-.446 1-1 1H2c-.554 0-1-.446-1-1V2c0-.554.446-1 1-1z"/>
+    <path d="M12.586 3.586L6.5 9.672 3.414 6.586 2 8l4.5 4.5L14 5z" fill="#fff"/>
+</svg>
diff --git a/3rdparty/icons/breeze/emblems/16/emblem-unavailable.svg b/3rdparty/icons/breeze/emblems/16/emblem-unavailable.svg
new file mode 100644 (file)
index 0000000..a47db09
--- /dev/null
@@ -0,0 +1,12 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
+    <style
+        type="text/css"
+        id="current-color-scheme">
+        .ColorScheme-Text {
+            color:#232629;
+        }
+    </style>
+    <rect fill="#7f8c8d" height="16" rx="2" width="16"/>
+    <path style="fill:currentColor;fill-opacity:0.6;stroke:none" class="ColorScheme-Text" d="M2 0C.892 0 0 .892 0 2v12c0 1.108.892 2 2 2h12c1.108 0 2-.892 2-2V2c0-1.108-.892-2-2-2zm0 1h12c.554 0 1 .446 1 1v12c0 .554-.446 1-1 1H2c-.554 0-1-.446-1-1V2c0-.554.446-1 1-1z"/>
+    <path d="M3.414 2L2 3.414 6.586 8 2 12.586 3.414 14 8 9.414 12.586 14 14 12.586 9.414 8 14 3.414 12.586 2 8 6.586z" fill="#fff"/>
+</svg>
index 9a555d1..804d670 100644 (file)
@@ -43,7 +43,7 @@ CoreInfoDlg::CoreInfoDlg(QWidget* parent)
     coreInfoResynchronized();
 
     // Warning icon
     coreInfoResynchronized();
 
     // Warning icon
-    ui.coreUnsupportedIcon->setPixmap(icon::get("dialog-warning").pixmap(16));
+    ui.coreUnsupportedIcon->setPixmap(icon::get({"emblem-unavailable", "dialog-warning"}).pixmap(16));
 
     updateUptime();
     startTimer(1000);
 
     updateUptime();
     startTimer(1000);
index b79e3e3..33774b8 100644 (file)
@@ -79,7 +79,7 @@ CoreHighlightSettingsPage::CoreHighlightSettingsPage(QWidget* parent)
     connect(Client::instance(), &Client::connected, this, &CoreHighlightSettingsPage::clientConnected);
 
     // Warning icon
     connect(Client::instance(), &Client::connected, this, &CoreHighlightSettingsPage::clientConnected);
 
     // Warning icon
-    ui.coreUnsupportedIcon->setPixmap(icon::get("dialog-warning").pixmap(16));
+    ui.coreUnsupportedIcon->setPixmap(icon::get({"emblem-unavailable", "dialog-warning"}).pixmap(16));
 
     // Set up client/monolithic remote highlights information
     // Local highlights are considered legacy
 
     // Set up client/monolithic remote highlights information
     // Local highlights are considered legacy
index 4a9b11d..2587b8a 100644 (file)
@@ -81,7 +81,7 @@ HighlightSettingsPage::HighlightSettingsPage(QWidget* parent)
     ui.highlightTable->horizontalHeader()->setSectionResizeMode(HighlightSettingsPage::ChanColumn, QHeaderView::ResizeToContents);
 
     // Information icon
     ui.highlightTable->horizontalHeader()->setSectionResizeMode(HighlightSettingsPage::ChanColumn, QHeaderView::ResizeToContents);
 
     // Information icon
-    ui.localHighlightsIcon->setPixmap(icon::get("dialog-information").pixmap(16));
+    ui.localHighlightsIcon->setPixmap(icon::get({"emblem-information", "dialog-information"}).pixmap(16));
 
     connect(ui.add, &QAbstractButton::clicked, this, [this]() { addNewRow(); });
     connect(ui.remove, &QAbstractButton::clicked, this, &HighlightSettingsPage::removeSelectedRows);
 
     connect(ui.add, &QAbstractButton::clicked, this, [this]() { addNewRow(); });
     connect(ui.remove, &QAbstractButton::clicked, this, &HighlightSettingsPage::removeSelectedRows);
index 6a36d0e..468f2b5 100644 (file)
@@ -67,8 +67,9 @@ NetworksSettingsPage::NetworksSettingsPage(QWidget* parent)
     disconnectedIcon = icon::get("network-disconnect");
 
     // Status icons
     disconnectedIcon = icon::get("network-disconnect");
 
     // Status icons
-    infoIcon = icon::get("dialog-information");
-    warningIcon = icon::get("dialog-warning");
+    successIcon = icon::get({"emblem-success", "dialog-information"});
+    unavailableIcon = icon::get({"emblem-unavailable", "dialog-warning"});
+    questionIcon = icon::get({"emblem-question", "dialog-question", "dialog-information"});
 
     foreach (int mib, QTextCodec::availableMibs()) {
         QByteArray codec = QTextCodec::codecForMib(mib)->name();
 
     foreach (int mib, QTextCodec::availableMibs()) {
         QByteArray codec = QTextCodec::codecForMib(mib)->name();
@@ -706,23 +707,23 @@ void NetworksSettingsPage::setSASLStatus(const CapSupportStatus saslStatus)
             // There's no capability negotiation or network doesn't exist.  Don't assume
             // anything.
             ui.saslStatusLabel->setText(QString("<i>%1</i>").arg(tr("Could not check if supported by network")));
             // There's no capability negotiation or network doesn't exist.  Don't assume
             // anything.
             ui.saslStatusLabel->setText(QString("<i>%1</i>").arg(tr("Could not check if supported by network")));
-            ui.saslStatusIcon->setPixmap(infoIcon.pixmap(16));
+            ui.saslStatusIcon->setPixmap(questionIcon.pixmap(16));
             break;
         case CapSupportStatus::Disconnected:
             // Disconnected from network, no way to check.
             ui.saslStatusLabel->setText(QString("<i>%1</i>").arg(tr("Cannot check if supported when disconnected")));
             break;
         case CapSupportStatus::Disconnected:
             // Disconnected from network, no way to check.
             ui.saslStatusLabel->setText(QString("<i>%1</i>").arg(tr("Cannot check if supported when disconnected")));
-            ui.saslStatusIcon->setPixmap(infoIcon.pixmap(16));
+            ui.saslStatusIcon->setPixmap(questionIcon.pixmap(16));
             break;
         case CapSupportStatus::MaybeUnsupported:
             // The network doesn't advertise support for SASL PLAIN.  Here be dragons.
             ui.saslStatusLabel->setText(QString("<i>%1</i>").arg(tr("Not currently supported by network")));
             break;
         case CapSupportStatus::MaybeUnsupported:
             // The network doesn't advertise support for SASL PLAIN.  Here be dragons.
             ui.saslStatusLabel->setText(QString("<i>%1</i>").arg(tr("Not currently supported by network")));
-            ui.saslStatusIcon->setPixmap(warningIcon.pixmap(16));
+            ui.saslStatusIcon->setPixmap(unavailableIcon.pixmap(16));
             break;
         case CapSupportStatus::MaybeSupported:
             // The network advertises support for SASL PLAIN.  Encourage using it!
             // Unfortunately we don't know for sure if it's desired or functional.
             ui.saslStatusLabel->setText(QString("<i>%1</i>").arg(tr("Supported by network")));
             break;
         case CapSupportStatus::MaybeSupported:
             // The network advertises support for SASL PLAIN.  Encourage using it!
             // Unfortunately we don't know for sure if it's desired or functional.
             ui.saslStatusLabel->setText(QString("<i>%1</i>").arg(tr("Supported by network")));
-            ui.saslStatusIcon->setPixmap(infoIcon.pixmap(16));
+            ui.saslStatusIcon->setPixmap(successIcon.pixmap(16));
             break;
         }
     }
             break;
         }
     }
index 33e474c..5c9efca 100644 (file)
@@ -137,7 +137,7 @@ private:
     QIcon connectedIcon, connectingIcon, disconnectedIcon;
 
     // Status icons
     QIcon connectedIcon, connectingIcon, disconnectedIcon;
 
     // Status icons
-    QIcon infoIcon, warningIcon;
+    QIcon successIcon, unavailableIcon, questionIcon;
 
     CapSupportStatus _saslStatusSelected;  /// Status of SASL support for currently-selected network
 
 
     CapSupportStatus _saslStatusSelected;  /// Status of SASL support for currently-selected network