Replace application icons with Material Design icons.

Use the following to run KeePassXC with the icons from the
source code, ignoring the operating system's Qt icon theme:

```
KEEPASSXC_IGNORE_ICON_THEME=1 keepassxc
```

The patch further adds a script `makeicons.sh` that re-creates KeePassXC
icons from the Material Design icon set and can be used for easily
updating icons in the future. Instructions are in the script.

Fixes #475
This commit is contained in:
Wolfram Rösler 2019-12-26 21:32:12 +01:00 committed by Janek Bevendorff
parent 470838f21c
commit 36f92b7649
238 changed files with 306 additions and 9562 deletions

View file

@ -30,16 +30,19 @@ LineEdit::LineEdit(QWidget* parent)
{
m_clearButton->setObjectName("clearButton");
QIcon icon;
QString iconNameDirected =
QString("edit-clear-locationbar-").append((layoutDirection() == Qt::LeftToRight) ? "rtl" : "ltr");
icon = QIcon::fromTheme(iconNameDirected);
if (icon.isNull()) {
icon = QIcon::fromTheme("edit-clear");
QIcon icon;
if (!getenv("KEEPASSXC_IGNORE_ICON_THEME")) {
icon = QIcon::fromTheme(iconNameDirected);
if (icon.isNull()) {
icon = filePath()->icon("actions", iconNameDirected);
icon = QIcon::fromTheme("edit-clear");
}
}
if (icon.isNull()) {
icon = filePath()->icon("actions", iconNameDirected);
}
m_clearButton->setIcon(icon);
m_clearButton->setCursor(Qt::ArrowCursor);