Fixing black icons when using dark theme on KDE SDK
This commit is contained in:
parent
78343cf153
commit
82d2ee84b7
2 changed files with 46 additions and 12 deletions
|
@ -20,6 +20,8 @@ import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import "../js/objects.js" as Objects
|
import "../js/objects.js" as Objects
|
||||||
import "../js/historylib.js" as HistoryLib
|
import "../js/historylib.js" as HistoryLib
|
||||||
|
import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmltype ObjectCreationGrid
|
\qmltype ObjectCreationGrid
|
||||||
|
@ -48,19 +50,42 @@ Column {
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: createBtn
|
id: createBtn
|
||||||
text: Objects.types[modelData].displayType()
|
|
||||||
width: parent.width/3
|
width: parent.width/3
|
||||||
visible: Objects.types[modelData].createable()
|
visible: Objects.types[modelData].createable()
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? width*0.6 : 0
|
||||||
display: AbstractButton.TextUnderIcon
|
// The KDE SDK is kinda buggy, so it respects neither specified color nor display propreties.
|
||||||
icon.name: modelData
|
//display: AbstractButton.TextUnderIcon
|
||||||
icon.source: '../icons/objects/' + modelData + '.svg'
|
|
||||||
icon.width: 24
|
Setting.Icon {
|
||||||
icon.height: 24
|
id: icon
|
||||||
icon.color: sysPalette.windowText
|
width: 24
|
||||||
|
height: 24
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: (parent.width-width)/2
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 8
|
||||||
|
|
||||||
|
color: sysPalette.windowText
|
||||||
|
source: '../icons/objects/'+modelData+'.svg'
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
id: label
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: 5
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 4
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 4
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
font.pixelSize: 14
|
||||||
|
text: Objects.types[modelData].displayType()
|
||||||
|
clip: true
|
||||||
|
}
|
||||||
|
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.delay: 200
|
ToolTip.delay: 200
|
||||||
ToolTip.text: text
|
ToolTip.text: label.text
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var newObj = Objects.createNewRegisteredObject(modelData)
|
var newObj = Objects.createNewRegisteredObject(modelData)
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Dialogs 1.3 as D
|
import QtQuick.Dialogs 1.3 as D
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
|
import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
|
||||||
import "../js/objects.js" as Objects
|
import "../js/objects.js" as Objects
|
||||||
import "../js/historylib.js" as HistoryLib
|
import "../js/historylib.js" as HistoryLib
|
||||||
|
|
||||||
|
@ -139,9 +140,17 @@ ListView {
|
||||||
anchors.right: deleteButton.left
|
anchors.right: deleteButton.left
|
||||||
anchors.rightMargin: 5
|
anchors.rightMargin: 5
|
||||||
anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
icon.name: 'position'
|
|
||||||
icon.source: '../icons/common/position.svg'
|
Setting.Icon {
|
||||||
icon.color: sysPalette.buttonText
|
id: icon
|
||||||
|
width: 18
|
||||||
|
height: 18
|
||||||
|
anchors.centerIn: parent
|
||||||
|
|
||||||
|
color: sysPalette.windowText
|
||||||
|
source: '../icons/common/position.svg'
|
||||||
|
}
|
||||||
|
|
||||||
property bool hasXProp: Objects.types[objType].properties().hasOwnProperty('x')
|
property bool hasXProp: Objects.types[objType].properties().hasOwnProperty('x')
|
||||||
property bool hasYProp: Objects.types[objType].properties().hasOwnProperty('y')
|
property bool hasYProp: Objects.types[objType].properties().hasOwnProperty('y')
|
||||||
visible: hasXProp || hasYProp
|
visible: hasXProp || hasYProp
|
||||||
|
|
Loading…
Reference in a new issue