Skip to content

Commit 5008bf0

Browse files
committed
Some GUI tweaks to improve dark mode readability
1 parent 288dcf7 commit 5008bf0

File tree

2 files changed

+94
-83
lines changed

2 files changed

+94
-83
lines changed

ui/settings.slint

Lines changed: 62 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -64,74 +64,79 @@ export SettingsView := VerticalBox {
6464
Palette.themeLighterAlt = #eff6fc;
6565
}
6666
}
67+
VerticalBox {
68+
alignment: start;
6769

68-
GroupBox {
69-
title: "Similar pictures";
70-
71-
VerticalBox {
72-
alignment: start;
70+
GroupBox {
71+
title: "Similar pictures";
7372

7473
HorizontalBox {
7574
alignment: start;
76-
77-
GridLayout {
78-
spacing: 5px;
79-
use-timestamps-checkbox := CheckBox {
80-
text: "Use timestamps";
81-
toggled => {
82-
recheck-similarities();
75+
76+
Rectangle {
77+
border-width: 1px;
78+
border-color: Palette.neutralPrimary;
79+
80+
GridLayout {
81+
padding: 10px;
82+
spacing: 5px;
83+
use-timestamps-checkbox := CheckBox {
84+
text: "Use timestamps";
85+
toggled => {
86+
recheck-similarities();
87+
}
8388
}
84-
}
85-
Text {
86-
text: "⇔ Maximum timestamp difference (s): ";
87-
vertical-alignment: center;
88-
horizontal-alignment: right;
89-
}
90-
timestamp-difference-edit := LineEdit {
91-
text: "5";
92-
width: 50px;
93-
enabled: use-timestamps-checkbox.checked;
94-
accepted => {
95-
recheck-similarities();
89+
Text {
90+
text: "⇔ Maximum timestamp difference (s): ";
91+
vertical-alignment: center;
92+
horizontal-alignment: right;
93+
}
94+
timestamp-difference-edit := LineEdit {
95+
text: "5";
96+
width: 50px;
97+
enabled: use-timestamps-checkbox.checked;
98+
accepted => {
99+
recheck-similarities();
100+
}
96101
}
97-
}
98102

99-
use-similarity-checkbox := CheckBox {
100-
text: "Use image similarity";
101-
toggled => {
102-
recheck-similarities();
103+
use-similarity-checkbox := CheckBox {
104+
text: "Use image similarity";
105+
toggled => {
106+
recheck-similarities();
107+
}
108+
row: 1;
103109
}
104-
row: 1;
105-
}
106-
Text {
107-
text: "Sensitivity: ";
108-
vertical-alignment: center;
109-
horizontal-alignment: right;
110-
}
111-
sensitivity-combobox := ComboBox {
112-
model: ["Very low", "Low", "Medium", "High", "Very high"];
113-
current-value: "Medium";
114-
enabled: use-similarity-checkbox.checked;
115-
selected => {
116-
recheck-similarities();
110+
Text {
111+
text: "Sensitivity: ";
112+
vertical-alignment: center;
113+
horizontal-alignment: right;
117114
}
118-
}
119-
Text {
120-
text: "Dark mode: ";
121-
vertical-alignment: center;
122-
horizontal-alignment: right;
123-
row: 3;
124-
}
125-
dark-mode := ComboBox {
126-
model: ["Automatic", "On", "Off"];
127-
current-value: "Automatic";
128-
selected => {
129-
apply-dark-mode();
115+
sensitivity-combobox := ComboBox {
116+
model: ["Very low", "Low", "Medium", "High", "Very high"];
117+
current-value: "Medium";
118+
enabled: use-similarity-checkbox.checked;
119+
selected => {
120+
recheck-similarities();
121+
}
122+
}
123+
Text {
124+
text: "Dark mode: ";
125+
vertical-alignment: center;
126+
horizontal-alignment: right;
127+
row: 3;
130128
}
131-
}
129+
dark-mode := ComboBox {
130+
model: ["Automatic", "On", "Off"];
131+
current-value: "Automatic";
132+
selected => {
133+
apply-dark-mode();
134+
}
135+
}
136+
}
132137
}
133-
}
134-
}
138+
}
139+
}
135140
}
136141
HorizontalBox {
137142
TouchArea {

ui/sieve.slint

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,35 +45,41 @@ export SieveView := HorizontalBox {
4545
GroupBox {
4646
title: "🎯 Target directory";
4747
enabled: sieve-method-combo-box.current-index != 3;
48-
VerticalBox {
49-
HorizontalBox {
50-
spacing: 5px;
51-
target-directory-edit := LineEdit {
52-
width: 400px;
53-
enabled: false;
54-
placeholder-text: "Select target directory";
55-
}
56-
Button {
57-
text: "📂 Browse...";
58-
width: 200px;
59-
enabled: !sieve-running && sieve-method-combo-box.current-index != 3;
60-
clicked => {
61-
browse-target();
48+
49+
Rectangle {
50+
border-width: 1px;
51+
border-color: Palette.neutralPrimary;
52+
53+
VerticalBox {
54+
HorizontalBox {
55+
spacing: 5px;
56+
target-directory-edit := LineEdit {
57+
width: 400px;
58+
enabled: false;
59+
placeholder-text: "Select target directory";
60+
}
61+
Button {
62+
text: "📂 Browse...";
63+
width: 200px;
64+
enabled: !sieve-running && sieve-method-combo-box.current-index != 3;
65+
clicked => {
66+
browse-target();
67+
}
6268
}
6369
}
64-
}
6570

66-
HorizontalBox {
67-
spacing: 5px;
68-
Text {
69-
text: "Directory names";
70-
vertical-alignment: center;
71-
}
72-
ComboBox {
73-
enabled: !sieve-running && sieve-method-combo-box.current-index != 3;
74-
width: 400px;
75-
model: SieveComboValues.directory_names;
76-
current-value <=> sieve-directory-names;
71+
HorizontalBox {
72+
spacing: 5px;
73+
Text {
74+
text: "Directory names";
75+
vertical-alignment: center;
76+
}
77+
ComboBox {
78+
enabled: !sieve-running && sieve-method-combo-box.current-index != 3;
79+
width: 400px;
80+
model: SieveComboValues.directory_names;
81+
current-value <=> sieve-directory-names;
82+
}
7783
}
7884
}
7985
}

0 commit comments

Comments
 (0)