feat: support symbolic icon deployment and recoloring linux, unify setTrayIcon to use theme icons only
This commit is contained in:
committed by
Chris Rizzitello
parent
72792e7d4d
commit
ddc827e6f1
@ -14,6 +14,13 @@ install(
|
||||
# Install our icon
|
||||
install(FILES ${MY_DIR}/org.deskflow.deskflow.png DESTINATION share/icons/hicolor/512x512/apps/)
|
||||
|
||||
# Install our symbolic icon
|
||||
install(
|
||||
FILES ${CMAKE_SOURCE_DIR}/src/apps/res/icons/deskflow-light/apps/64/deskflow-symbolic.svg
|
||||
DESTINATION share/icons/hicolor/symbolic/apps/
|
||||
RENAME org.deskflow.deskflow-symbolic.svg
|
||||
)
|
||||
|
||||
# Install our metainfo
|
||||
install(
|
||||
FILES ${MY_DIR}/${CMAKE_PROJECT_REV_FQDN}.metainfo.xml
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
<svg version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#fff">
|
||||
<defs id="defs62">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #fcfcfc; } </style>
|
||||
</defs>
|
||||
<g fill="currentColor" class="ColorScheme-Text">
|
||||
<path transform="matrix(.0035792 0 0 .00332131 3.3640502 8.5103867)" d="m10822.775 14277.69c-1195.5832-143.508-2220.2063-841.148-3268.3667-1379.127-718.8533-355.301-1431.1297-838.976-2251.4363-896.085-491.0057-34.634-993.9142 16.701-1419.8658 282.946-632.9097 323.689-1041.4867 924.538-1556.5718 1387.702-543.283 324.938-1024.416-324.503-999.9439-831.854-66.7515-706.46 526.7775-1215.106 971.4799-1675.328 796.7042-788.985 1908.9735-1339.2985 3051.7899-1198.3588 1348.2477 151.6528 2490.0786 954.1998 3671.9639 1551.7868 812.8473 430.368 1732.2728 937.309 2680.6698 656.999 865.182-240.211 1345.317-1049.536 1918.072-1669.709 419.319-369.53 999.56 99.027 1037.303 575.62 144.849 591.439-228.81 1099.793-584.858 1527.872-674.991 878.758-1646.404 1612.499-2788.132 1678.492-153.996 19.794-308.698 6.257-462.104-10.956z"/>
|
||||
<path transform="matrix(.0035792 0 0 .00332131 3.3640502 8.5103867)" d="m10691.975 9232.2954c-1346.7866-233.442-2482.2127-1056.6227-3678.5758-1664.7424-695.4986-378.4799-1470.5745-714.0712-2280.7464-598.1882-941.5676 103.7825-1636.2665 838.7246-2221.3709 1517.6968-357.7822 475.5363-1019.0962 175.8535-1141.2824-335.3297-208.9829-548.6041 47.2435-1132.7956 434.1797-1530.8079 842.7581-995.9376 2062.8343-1830.0934 3422.8453-1718.801 1538.2424 122.1926 2802.7979 1096.8978 4150.0464 1747.2218 689.4831 373.3537 1480.8271 695.5213 2275.6811 498.2159 843.443-225.4675 1355.155-986.6873 1874.463-1625.928 303.839-429.2412 935.004-202.6984 1073.134 247.0946 229.503 525.6439 50.159 1127.049-311.918 1545.1618-731.881 1031.1947-1847.889 1971.3437-3180.435 1938.7364-138.853 1.6775-278.273-1.5834-416.021-20.3301z"/>
|
||||
<path transform="matrix(.0035792 0 0 .00332131 3.3640502 8.5103867)" d="m10576.744 4172.4544c-1701.8803-307.3997-3032.1599-1536.7149-4636.2805-2103.0311-760.2252-231.6118-1634.8256-183.7851-2292.0294 297.8872-522.046 315.7633-870.3773 828.5536-1307.695 1235.7633-408.0241 287.6051-882.8065-100.3925-976.5864-516.0856-207.011-566.4578 84.2445-1166.9024 491.559-1564.2835 824.1797-978.84256 2034.8379-1776.0729 3363.7164-1666.2309 1553.6459 128.55364 2838.511 1104.9364 4193.6746 1778.0128 748.5153 409.2855 1666.3233 736.8711 2500.3373 374.9559 742.862-301.9425 1184.93-1003.6082 1669.344-1599.364 390.513-404.44774 1011.637 22.50986 1078.781 494.20116 143.129 510.48212-76.578 1022.7906-407.346 1408.7503-715.856 1002.3301-1795.1 1907.7734-3088.381 1906.4911-197.264 2.2737-394.6-14.3348-589.094-47.0667z"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.7 KiB |
@ -1,5 +1,8 @@
|
||||
<svg version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#232629">
|
||||
<defs id="defs62">
|
||||
<style type="text/css" id="current-color-scheme">.ColorScheme-Text { color: #232629; } </style>
|
||||
</defs>
|
||||
<g fill="currentColor" class="ColorScheme-Text">
|
||||
<path transform="matrix(.0035792 0 0 .00332131 3.3640502 8.5103867)" d="m10822.775 14277.69c-1195.5832-143.508-2220.2063-841.148-3268.3667-1379.127-718.8533-355.301-1431.1297-838.976-2251.4363-896.085-491.0057-34.634-993.9142 16.701-1419.8658 282.946-632.9097 323.689-1041.4867 924.538-1556.5718 1387.702-543.283 324.938-1024.416-324.503-999.9439-831.854-66.7515-706.46 526.7775-1215.106 971.4799-1675.328 796.7042-788.985 1908.9735-1339.2985 3051.7899-1198.3588 1348.2477 151.6528 2490.0786 954.1998 3671.9639 1551.7868 812.8473 430.368 1732.2728 937.309 2680.6698 656.999 865.182-240.211 1345.317-1049.536 1918.072-1669.709 419.319-369.53 999.56 99.027 1037.303 575.62 144.849 591.439-228.81 1099.793-584.858 1527.872-674.991 878.758-1646.404 1612.499-2788.132 1678.492-153.996 19.794-308.698 6.257-462.104-10.956z"/>
|
||||
<path transform="matrix(.0035792 0 0 .00332131 3.3640502 8.5103867)" d="m10691.975 9232.2954c-1346.7866-233.442-2482.2127-1056.6227-3678.5758-1664.7424-695.4986-378.4799-1470.5745-714.0712-2280.7464-598.1882-941.5676 103.7825-1636.2665 838.7246-2221.3709 1517.6968-357.7822 475.5363-1019.0962 175.8535-1141.2824-335.3297-208.9829-548.6041 47.2435-1132.7956 434.1797-1530.8079 842.7581-995.9376 2062.8343-1830.0934 3422.8453-1718.801 1538.2424 122.1926 2802.7979 1096.8978 4150.0464 1747.2218 689.4831 373.3537 1480.8271 695.5213 2275.6811 498.2159 843.443-225.4675 1355.155-986.6873 1874.463-1625.928 303.839-429.2412 935.004-202.6984 1073.134 247.0946 229.503 525.6439 50.159 1127.049-311.918 1545.1618-731.881 1031.1947-1847.889 1971.3437-3180.435 1938.7364-138.853 1.6775-278.273-1.5834-416.021-20.3301z"/>
|
||||
<path transform="matrix(.0035792 0 0 .00332131 3.3640502 8.5103867)" d="m10576.744 4172.4544c-1701.8803-307.3997-3032.1599-1536.7149-4636.2805-2103.0311-760.2252-231.6118-1634.8256-183.7851-2292.0294 297.8872-522.046 315.7633-870.3773 828.5536-1307.695 1235.7633-408.0241 287.6051-882.8065-100.3925-976.5864-516.0856-207.011-566.4578 84.2445-1166.9024 491.559-1564.2835 824.1797-978.84256 2034.8379-1776.0729 3363.7164-1666.2309 1553.6459 128.55364 2838.511 1104.9364 4193.6746 1778.0128 748.5153 409.2855 1666.3233 736.8711 2500.3373 374.9559 742.862-301.9425 1184.93-1003.6082 1669.344-1599.364 390.513-404.44774 1011.637 22.50986 1078.781 494.20116 143.129 510.48212-76.578 1022.7906-407.346 1408.7503-715.856 1002.3301-1795.1 1907.7734-3088.381 1906.4911-197.264 2.2737-394.6-14.3348-589.094-47.0667z"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.7 KiB |
@ -754,23 +754,17 @@ void MainWindow::saveSettings() const
|
||||
|
||||
void MainWindow::setTrayIcon()
|
||||
{
|
||||
// Using a theme icon that is packed in exe renders an invisible icon
|
||||
// Instead use the resource path of the packed icon
|
||||
const bool symbolicIcon = Settings::value(Settings::Gui::SymbolicTrayIcon).toBool();
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_APPLE)
|
||||
QString iconString = QStringLiteral(":/icons/deskflow-%1/apps/64/deskflow").arg(iconMode());
|
||||
if (symbolicIcon)
|
||||
iconString.append(QStringLiteral("-symbolic"));
|
||||
m_trayIcon->setIcon(QIcon(iconString));
|
||||
#else
|
||||
if (symbolicIcon) {
|
||||
auto icon = QIcon::fromTheme(QStringLiteral("%1-symbolic").arg(kAppId));
|
||||
icon.setIsMask(true);
|
||||
m_trayIcon->setIcon(icon);
|
||||
} else {
|
||||
m_trayIcon->setIcon(QIcon::fromTheme(kAppId));
|
||||
QString iconString = kRevFqdnName;
|
||||
|
||||
if (!Settings::value(Settings::Gui::SymbolicTrayIcon).toBool()) {
|
||||
m_trayIcon->setIcon(QIcon::fromTheme(iconString));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
iconString.append(QStringLiteral("-symbolic"));
|
||||
auto icon = QIcon::fromTheme(iconString);
|
||||
icon.setIsMask(true);
|
||||
m_trayIcon->setIcon(icon);
|
||||
}
|
||||
|
||||
void MainWindow::handleLogLine(const QString &line)
|
||||
|
||||
Reference in New Issue
Block a user