Skip to content

Commit

Permalink
SQUASH, REORDER assorted color tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Oct 6, 2023
1 parent 15e32a0 commit be01d6c
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion source/app/ui/qml/Find.qml
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ Rectangle
else
return qsTr("Not Found");
}
color: palette.mid
color: Qt.platform.os === "osx" ? palette.dark : palette.mid
}

MouseArea
Expand Down
12 changes: 7 additions & 5 deletions source/app/ui/qml/ManageNamedListDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,16 @@ Window
rightPadding: listBox.scrollBarWidth
leftInset: -8

property var highlightColor: listBox.highlightedProvider(index) ?
palette.highlight : "transparent"

background: Rectangle { color: parent.highlightColor }
background: Rectangle
{
visible: listBox.highlightedProvider(index)
color: palette.highlight
}

text: modelData

color: QmlUtils.contrastingColor(highlightColor)
color: listBox.highlightedProvider(index) ?
palette.highlightedText : palette.windowText
elide: Text.ElideRight
renderType: Text.NativeRendering
}
Expand Down
3 changes: 2 additions & 1 deletion source/app/ui/qml/Options/OptionsDefaults.qml
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,12 @@ Item
}
}

Item
Rectangle
{
Layout.fillWidth: true
Layout.fillHeight: true
visible: root.ambiguityInExtensionsOrPlugins
color: palette.light

ScrollView
{
Expand Down
4 changes: 3 additions & 1 deletion source/app/ui/qml/app/graphia/Controls/FramedScrollView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ import QtQuick.Controls

import app.graphia.Shared.Controls

Item
Rectangle
{
property alias contentChildren: scrollView.contentChildren
default property alias contentData: scrollView.contentData

color: palette.light

ScrollView
{
id: scrollView
Expand Down
4 changes: 2 additions & 2 deletions source/app/ui/qml/app/graphia/Controls/ListBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Rectangle
model[root.displayRole] : modelData

color: root.highlightedProvider(index) ?
palette.highlightedText : palette.windowText
palette.highlightedText : palette.text
elide: Text.ElideRight
renderType: Text.NativeRendering
}
Expand Down Expand Up @@ -144,7 +144,7 @@ Rectangle
// Just some semi-sensible defaults
width: 200
height: 100
color: palette.window
color: palette.light

ListView
{
Expand Down
12 changes: 6 additions & 6 deletions source/app/ui/qml/app/graphia/Controls/TreeBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Item
Layout.fillWidth: true
Layout.fillHeight: true

color: palette.window
color: palette.light

TreeView
{
Expand Down Expand Up @@ -415,12 +415,12 @@ Item
visible: hasSectionRow
font.bold: true
font.italic: true
color: palette.windowText
color: palette.text

text: { return hasSectionRow ? treeView.sectionTextFor(model.row) : ""; }
}

color: palette.window
color: palette.light

TreeViewDelegate
{
Expand Down Expand Up @@ -454,7 +454,7 @@ Item
// structure of the delegate implementation, so it could break in future

let contrastBinding = Qt.binding(() =>
selected ? palette.highlightedText : palette.windowText);
selected ? palette.highlightedText : palette.text);

if(contentItem instanceof Text)
{
Expand Down Expand Up @@ -586,7 +586,7 @@ Item
anchors.top: parent.top
anchors.left: parent.left

color: palette.window
color: palette.light
border.width: 1
border.color: OutlineColor.scheme
radius: 2
Expand All @@ -604,7 +604,7 @@ Item

elide: Text.ElideRight
font.italic: true
color: palette.windowText
color: palette.text

text: root.prettifyFunction(parent.text)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ Item
for(let i = 0; i < Math.ceil(tableView.height / tableView.rowHeight) + 1; i++)
{
let yOffset = (i * tableView.rowHeight);
ctx.fillStyle = i % 2 ? palette.window : palette.alternateBase;
ctx.fillStyle = i % 2 ? palette.light : palette.midlight;
ctx.fillRect(0, yOffset, width, tableView.rowHeight);
}
}
Expand Down Expand Up @@ -1189,7 +1189,7 @@ Item
if(model.subSelected)
return palette.highlight;

return model.row % 2 ? palette.window : palette.alternateBase;
return model.row % 2 ? palette.light : palette.midlight;
}

// Ripped more or less verbatim from qtquickcontrols/src/controls/Styles/Desktop/TableViewStyle.qml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import QtQuick
Item
{
readonly property color light: palette.mid
readonly property color dark: palette.dark
readonly property color dark: Qt.platform.os === "osx" ? palette.mid : palette.dark
readonly property color scheme: Application.styleHints.colorScheme === Qt.Light ?
light : dark
}

0 comments on commit be01d6c

Please sign in to comment.