Updated colour icon theme

This commit is contained in:
Veronica K. B. Olsen
2020-05-14 16:44:14 +02:00
parent 8603bf8af8
commit 0566df433b
21 changed files with 229 additions and 210 deletions
+8 -2
View File
@@ -31,7 +31,7 @@ import nw
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (
QDialog, QHBoxLayout, QVBoxLayout, QGroupBox, QFormLayout, QLineEdit,
QPushButton, QComboBox
QPushButton, QComboBox, QLabel
)
from nw.constants import nwLabels, nwItemLayout, nwItemClass, nwItemType
@@ -54,11 +54,17 @@ class GuiItemEditor(QDialog):
self.innerBox = QVBoxLayout()
self.setWindowTitle("Item Settings")
self.guiDeco = self.theParent.theTheme.loadDecoration("settings",(64,64))
self.guiDeco = QLabel()
self.guiDeco.setPixmap(
self.theParent.theTheme.getPixmap(
nwLabels.CLASS_ICON[self.theItem.itemClass], (64,64)
)
)
self.setLayout(self.outerBox)
self.outerBox.addWidget(self.guiDeco, 0, Qt.AlignTop)
self.outerBox.addLayout(self.innerBox)
self.outerBox.setSpacing(16)
self.mainGroup = QGroupBox("Item Settings")
self.mainForm = QFormLayout()
+15 -9
View File
@@ -98,10 +98,13 @@ class GuiIcons:
self.confFile = None
# Icon Theme Meta
self.themeName = ""
self.themeAuthor = ""
self.themeCredit = ""
self.themeUrl = ""
self.themeName = ""
self.themeDescription = ""
self.themeAuthor = ""
self.themeCredit = ""
self.themeUrl = ""
self.themeLicense = ""
self.themeLicenseUrl = ""
return
@@ -133,10 +136,13 @@ class GuiIcons:
## Main
cnfSec = "Main"
if confParser.has_section(cnfSec):
self.themeName = self._parseLine( confParser, cnfSec, "name", "")
self.themeAuthor = self._parseLine( confParser, cnfSec, "author", "")
self.themeCredit = self._parseLine( confParser, cnfSec, "credit", "")
self.themeUrl = self._parseLine( confParser, cnfSec, "url", "")
self.themeName = self._parseLine( confParser, cnfSec, "name", "")
self.themeDescription = self._parseLine( confParser, cnfSec, "description", "")
self.themeAuthor = self._parseLine( confParser, cnfSec, "author", "")
self.themeCredit = self._parseLine( confParser, cnfSec, "credit", "")
self.themeUrl = self._parseLine( confParser, cnfSec, "url", "")
self.themeLicense = self._parseLine( confParser, cnfSec, "license", "")
self.themeLicenseUrl = self._parseLine( confParser, cnfSec, "licenseurl", "")
## Palette
cnfSec = "Map"
@@ -219,7 +225,7 @@ class GuiIcons:
return QIcon()
if iconKey in self.themeMap:
logger.verbose("Loading: %s" % self.themeMap[iconKey])
logger.verbose("Loading: %s" % path.relpath(self.themeMap[iconKey]))
return QIcon(self.themeMap[iconKey])
# Next, we try to load the Qt style icons