Skip to content

Commit 3d32001

Browse files
authored
feat: option for compact controls in panel view (#238)
* Compact controls option Adds an option to reduce spacing between playback control buttons to zero, because they were to far apart imho. * Update uk.po * Rename option to «Space between controls»
1 parent bd0e12b commit 3d32001

File tree

7 files changed

+251
-220
lines changed

7 files changed

+251
-220
lines changed

src/contents/config/main.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@
9696
<entry name="panelControlsSizeRatio" type="Double">
9797
<default>0.75</default>
9898
</entry>
99+
<entry name="spaceBetweenControlsInPanel" type="Bool">
100+
<default>true</default>
101+
</entry>
99102
<entry name="titlePosition" type="Int">
100103
<default>1</default>
101104
</entry>

src/contents/ui/Compact.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Item {
2323

2424
readonly property int widgetThickness: horizontal ? height : width
2525
readonly property int controlsSize: Math.round(widgetThickness * plasmoid.configuration.panelControlsSizeRatio)
26+
readonly property bool spaceBetweenControlsInPanel: plasmoid.configuration.spaceBetweenControlsInPanel
2627
readonly property int iconSize: Math.round(widgetThickness * plasmoid.configuration.panelIconSizeRatio)
2728
readonly property int lengthMargin: Math.round((widgetThickness - Math.max(controlsSize, iconSize))) / 2
2829

@@ -211,6 +212,8 @@ Item {
211212
GridLayout {
212213
columns: horizontal ? grid.children.length : 1
213214
rows: horizontal ? 1 : grid.children.length
215+
columnSpacing: spaceBetweenControlsInPanel ? Kirigami.Units.smallSpacing : 0
216+
rowSpacing: spaceBetweenControlsInPanel ? Kirigami.Units.smallSpacing : 0
214217

215218
Layout.fillHeight: horizontal
216219
Layout.fillWidth: !horizontal

src/contents/ui/config/Compact.qml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ KCM.SimpleKCM {
3333
property alias cfg_songTextAlignment: songTextPositionRadio.value
3434
property alias cfg_panelIconSizeRatio: panelIconSizeRatio.value
3535
property alias cfg_panelControlsSizeRatio: panelControlsSizeRatio.value
36+
property alias cfg_spaceBetweenControlsInPanel: spaceBetweenControlsInPanel.checked
3637
property alias cfg_artistsPosition: artistsPosition.value
3738
property alias cfg_titlePosition: titlePosition.value
3839
property alias cfg_albumPosition: albumPosition.value
@@ -464,6 +465,10 @@ KCM.SimpleKCM {
464465
stepSize: 0.05
465466
Kirigami.FormData.label: i18n("Size:")
466467
}
468+
CheckBox {
469+
id: spaceBetweenControlsInPanel
470+
Kirigami.FormData.label: i18n("Space between controls")
471+
}
467472

468473
Kirigami.Separator {
469474
Kirigami.FormData.isSection: true

src/translate/it.po

Lines changed: 60 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: plasmusic-toolbar\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-09-30 01:47+0200\n"
10+
"POT-Creation-Date: 2025-10-05 13:13+0200\n"
1111
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212
"Last-Translator: Automatically generated\n"
1313
"Language-Team: none\n"
@@ -42,17 +42,17 @@ msgstr "Porta il player in primo piano"
4242
msgid "This player can't be raised"
4343
msgstr "Questo player non può essere portato in primo piano"
4444

45-
#: src/contents/ui/config/Compact.qml:46
45+
#: src/contents/ui/config/Compact.qml:47
4646
#, kde-format
4747
msgid "Layout"
4848
msgstr "Disposizione"
4949

50-
#: src/contents/ui/config/Compact.qml:50
50+
#: src/contents/ui/config/Compact.qml:51
5151
#, kde-format
5252
msgid "Fill available space in the panel"
5353
msgstr "Riempi lo spazio disponibile nel pannello"
5454

55-
#: src/contents/ui/config/Compact.qml:56
55+
#: src/contents/ui/config/Compact.qml:57
5656
#, kde-format
5757
msgid ""
5858
"The widget fills all available width in the horizontal panel (or height in "
@@ -66,234 +66,239 @@ msgstr ""
6666
"il testo della canzone può essere posizionato in base alle preferenze "
6767
"dell'utente."
6868

69-
#: src/contents/ui/config/Compact.qml:67
69+
#: src/contents/ui/config/Compact.qml:68
7070
#, kde-format
7171
msgid "Song text alignment:"
7272
msgstr "Allineamento brano:"
7373

74-
#: src/contents/ui/config/Compact.qml:68
74+
#: src/contents/ui/config/Compact.qml:69
7575
#, kde-format
7676
msgid "Left (Top for vertical panel)"
7777
msgstr "Sinistra (Alto per pannello verticale)"
7878

79-
#: src/contents/ui/config/Compact.qml:79
79+
#: src/contents/ui/config/Compact.qml:80
8080
#, kde-format
8181
msgid "Center"
8282
msgstr "Centro"
8383

84-
#: src/contents/ui/config/Compact.qml:90
84+
#: src/contents/ui/config/Compact.qml:91
8585
#, kde-format
8686
msgid "Right (Bottom for vertical panel)"
8787
msgstr "Destra (Basso per pannello verticale)"
8888

89-
#: src/contents/ui/config/Compact.qml:102
89+
#: src/contents/ui/config/Compact.qml:103
9090
#, kde-format
9191
msgid "Show icon:"
9292
msgstr "Mostra icona:"
9393

94-
#: src/contents/ui/config/Compact.qml:107
94+
#: src/contents/ui/config/Compact.qml:108
9595
#, kde-format
9696
msgid "Show song text"
9797
msgstr "Mostra brano"
9898

99-
#: src/contents/ui/config/Compact.qml:112
99+
#: src/contents/ui/config/Compact.qml:113
100100
#, kde-format
101101
msgid "Show skip backward control"
102102
msgstr "Mostra comando indietro"
103103

104-
#: src/contents/ui/config/Compact.qml:117
104+
#: src/contents/ui/config/Compact.qml:118
105105
#, kde-format
106106
msgid "Show play/pause control"
107107
msgstr "Mostra comando riproduci/pausa"
108108

109-
#: src/contents/ui/config/Compact.qml:122
109+
#: src/contents/ui/config/Compact.qml:123
110110
#, kde-format
111111
msgid "Show skip forward control"
112112
msgstr "Mostra comando avanti"
113113

114-
#: src/contents/ui/config/Compact.qml:127
114+
#: src/contents/ui/config/Compact.qml:128
115115
#, kde-format
116116
msgid "Icon customization"
117117
msgstr "Personalizzazione icona"
118118

119-
#: src/contents/ui/config/Compact.qml:132
119+
#: src/contents/ui/config/Compact.qml:133
120120
#, kde-format
121121
msgid "Icon:"
122122
msgstr "Icona:"
123123

124-
#: src/contents/ui/config/Compact.qml:141
125-
#: src/contents/ui/config/Compact.qml:465
124+
#: src/contents/ui/config/Compact.qml:142
125+
#: src/contents/ui/config/Compact.qml:466
126126
#, kde-format
127127
msgid "Size:"
128128
msgstr "Dimensione:"
129129

130-
#: src/contents/ui/config/Compact.qml:146
130+
#: src/contents/ui/config/Compact.qml:147
131131
#, kde-format
132132
msgid "Use album cover as icon"
133133
msgstr "Usa copertina album come icona"
134134

135-
#: src/contents/ui/config/Compact.qml:152
135+
#: src/contents/ui/config/Compact.qml:153
136136
#, kde-format
137137
msgid "Fallback to icon if cover is not available"
138138
msgstr "Usa icona se la copertina non è disponibile"
139139

140-
#: src/contents/ui/config/Compact.qml:162
140+
#: src/contents/ui/config/Compact.qml:163
141141
#, kde-format
142142
msgid "Album cover radius:"
143143
msgstr "Arrotondamento bordo copertina album:"
144144

145-
#: src/contents/ui/config/Compact.qml:167
145+
#: src/contents/ui/config/Compact.qml:168
146146
#, kde-format
147147
msgid "Song text customization"
148148
msgstr "Personalizzazione testo brano"
149149

150-
#: src/contents/ui/config/Compact.qml:178 src/contents/ui/config/Full.qml:76
150+
#: src/contents/ui/config/Compact.qml:179 src/contents/ui/config/Full.qml:76
151151
#, kde-format
152152
msgid "Song title position:"
153153
msgstr "Posizionamento titolo:"
154154

155-
#: src/contents/ui/config/Compact.qml:179
156-
#: src/contents/ui/config/Compact.qml:226
157-
#: src/contents/ui/config/Compact.qml:271 src/contents/ui/config/Full.qml:77
155+
#: src/contents/ui/config/Compact.qml:180
156+
#: src/contents/ui/config/Compact.qml:227
157+
#: src/contents/ui/config/Compact.qml:272 src/contents/ui/config/Full.qml:77
158158
#: src/contents/ui/config/Full.qml:124 src/contents/ui/config/Full.qml:169
159159
#, kde-format
160160
msgid "Hidden"
161161
msgstr "Nascosto"
162162

163-
#: src/contents/ui/config/Compact.qml:190
164-
#: src/contents/ui/config/Compact.qml:237
165-
#: src/contents/ui/config/Compact.qml:282 src/contents/ui/config/Full.qml:88
163+
#: src/contents/ui/config/Compact.qml:191
164+
#: src/contents/ui/config/Compact.qml:238
165+
#: src/contents/ui/config/Compact.qml:283 src/contents/ui/config/Full.qml:88
166166
#: src/contents/ui/config/Full.qml:135 src/contents/ui/config/Full.qml:180
167167
#, kde-format
168168
msgid "First line"
169169
msgstr "Prima riga"
170170

171-
#: src/contents/ui/config/Compact.qml:201
172-
#: src/contents/ui/config/Compact.qml:248
173-
#: src/contents/ui/config/Compact.qml:293 src/contents/ui/config/Full.qml:99
171+
#: src/contents/ui/config/Compact.qml:202
172+
#: src/contents/ui/config/Compact.qml:249
173+
#: src/contents/ui/config/Compact.qml:294 src/contents/ui/config/Full.qml:99
174174
#: src/contents/ui/config/Full.qml:146 src/contents/ui/config/Full.qml:191
175175
#, kde-format
176176
msgid "Second line"
177177
msgstr "Seconda riga"
178178

179-
#: src/contents/ui/config/Compact.qml:225 src/contents/ui/config/Full.qml:123
179+
#: src/contents/ui/config/Compact.qml:226 src/contents/ui/config/Full.qml:123
180180
#, kde-format
181181
msgid "Artists position:"
182182
msgstr "Posizione artista/i:"
183183

184-
#: src/contents/ui/config/Compact.qml:270 src/contents/ui/config/Full.qml:168
184+
#: src/contents/ui/config/Compact.qml:271 src/contents/ui/config/Full.qml:168
185185
#, kde-format
186186
msgid "Album title position:"
187187
msgstr "Posizione titolo album:"
188188

189-
#: src/contents/ui/config/Compact.qml:311
189+
#: src/contents/ui/config/Compact.qml:312
190190
#, kde-format
191191
msgid "Use fixed width"
192192
msgstr "Usa larghezza fissa"
193193

194-
#: src/contents/ui/config/Compact.qml:318
194+
#: src/contents/ui/config/Compact.qml:319
195195
#, kde-format
196196
msgid "fixed width:"
197197
msgstr "larghezza fissa:"
198198

199-
#: src/contents/ui/config/Compact.qml:326
199+
#: src/contents/ui/config/Compact.qml:327
200200
#, kde-format
201201
msgid "max width:"
202202
msgstr "larghezza massima:"
203203

204-
#: src/contents/ui/config/Compact.qml:336
204+
#: src/contents/ui/config/Compact.qml:337
205205
#, kde-format
206206
msgid "Truncated text style:"
207207
msgstr ""
208208

209-
#: src/contents/ui/config/Compact.qml:337
209+
#: src/contents/ui/config/Compact.qml:338
210210
#, kde-format
211211
msgid "Works only when the text is not scrolling and in the initial position"
212212
msgstr ""
213213

214-
#: src/contents/ui/config/Compact.qml:346
214+
#: src/contents/ui/config/Compact.qml:347
215215
#, kde-format
216216
msgid "Elide"
217217
msgstr ""
218218

219-
#: src/contents/ui/config/Compact.qml:357
219+
#: src/contents/ui/config/Compact.qml:358
220220
#, kde-format
221221
msgid "Fade out"
222222
msgstr ""
223223

224-
#: src/contents/ui/config/Compact.qml:368
224+
#: src/contents/ui/config/Compact.qml:369
225225
#, kde-format
226226
msgid "None"
227227
msgstr ""
228228

229-
#: src/contents/ui/config/Compact.qml:380 src/contents/ui/config/Full.qml:203
229+
#: src/contents/ui/config/Compact.qml:381 src/contents/ui/config/Full.qml:203
230230
#, kde-format
231231
msgid "Text scrolling"
232232
msgstr "Scorrimento testo"
233233

234-
#: src/contents/ui/config/Compact.qml:385
234+
#: src/contents/ui/config/Compact.qml:386
235235
#, kde-format
236236
msgid "Enabled"
237237
msgstr "Abilitato"
238238

239-
#: src/contents/ui/config/Compact.qml:394 src/contents/ui/config/Full.qml:212
239+
#: src/contents/ui/config/Compact.qml:395 src/contents/ui/config/Full.qml:212
240240
#, kde-format
241241
msgid "Speed:"
242242
msgstr "Velocità:"
243243

244-
#: src/contents/ui/config/Compact.qml:404
244+
#: src/contents/ui/config/Compact.qml:405
245245
#, kde-format
246246
msgid "When text overflows:"
247247
msgstr "Quando il testo eccede:"
248248

249-
#: src/contents/ui/config/Compact.qml:406
249+
#: src/contents/ui/config/Compact.qml:407
250250
#, kde-format
251251
msgid "Always scroll"
252252
msgstr "Scorri sempre"
253253

254-
#: src/contents/ui/config/Compact.qml:419
254+
#: src/contents/ui/config/Compact.qml:420
255255
#, kde-format
256256
msgid "Scroll only on mouse over"
257257
msgstr "Scorri solo al passaggio del mouse"
258258

259-
#: src/contents/ui/config/Compact.qml:432
259+
#: src/contents/ui/config/Compact.qml:433
260260
#, kde-format
261261
msgid "Always scroll except on mouse over"
262262
msgstr "Scorri sempre tranne al passaggio del mouse"
263263

264-
#: src/contents/ui/config/Compact.qml:445
264+
#: src/contents/ui/config/Compact.qml:446
265265
#, kde-format
266266
msgid "Pause scrolling while media is not playing"
267267
msgstr "Ferma scorrimento quando il media è in pausa"
268268

269-
#: src/contents/ui/config/Compact.qml:450
269+
#: src/contents/ui/config/Compact.qml:451
270270
#, kde-format
271271
msgid "Reset position when scrolling is paused"
272272
msgstr "Reimposta posizione quando lo scorrimento è in pausa"
273273

274-
#: src/contents/ui/config/Compact.qml:456
274+
#: src/contents/ui/config/Compact.qml:457
275275
#, kde-format
276276
msgid "Playback controls customization"
277277
msgstr "Personalizzazione comandi di riproduzione"
278278

279-
#: src/contents/ui/config/Compact.qml:470 src/contents/ui/config/Full.qml:217
279+
#: src/contents/ui/config/Compact.qml:470
280+
#, kde-format
281+
msgid "Space between controls"
282+
msgstr ""
283+
284+
#: src/contents/ui/config/Compact.qml:475 src/contents/ui/config/Full.qml:217
280285
#, kde-format
281286
msgid "Background"
282287
msgstr "Sfondo"
283288

284-
#: src/contents/ui/config/Compact.qml:474
289+
#: src/contents/ui/config/Compact.qml:479
285290
#, kde-format
286291
msgid "Colors from album cover"
287292
msgstr "Colori dalla copertina dell'album"
288293

289-
#: src/contents/ui/config/Compact.qml:482
294+
#: src/contents/ui/config/Compact.qml:487
290295
#, kde-format
291296
msgid "Use album cover as icon should be checked for background to work."
292297
msgstr ""
293298
"Perché lo sfondo funzioni, deve essere selezionata l'opzione 'Usa copertina "
294299
"album come icona'."
295300

296-
#: src/contents/ui/config/Compact.qml:493
301+
#: src/contents/ui/config/Compact.qml:498
297302
#, kde-format
298303
msgid "Colored background radius:"
299304
msgstr "Arrotondamento bordi sfondo:"

0 commit comments

Comments
 (0)