File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -401,23 +401,24 @@ PlasmoidItem {
401
401
target: root
402
402
403
403
function onWidgetElementsLayoutUpdated () {
404
- widgetRow .updatePreferredWidth ();
404
+ var preferredWidth = plasmoid .configuration .widgetFillWidth ? widgetRow .calculatePreferredWidth () : - 1 ;
405
+ widgetRow .Layout .preferredWidth = preferredWidth;
405
406
}
406
407
}
407
408
408
- function updatePreferredWidth () {
409
+ function calculatePreferredWidth () {
409
410
var repeater = widgetElementsRepeater .visible ? widgetElementsRepeater : widgetElementsMaximizedRepeater;
410
411
var preferredWidth = (repeater .count - 1 ) * widgetRow .spacing ;
411
412
for (var i = 0 ; i < repeater .count ; i++ ) {
412
413
var item = repeater .itemAt (i);
413
414
preferredWidth += Utils .calculateItemPreferredWidth (item);
414
415
}
415
416
if (preferredWidth < widgetRow .Layout .minimumWidth ) {
416
- widgetRow . Layout . preferredWidth = widgetRow .Layout .minimumWidth ;
417
+ return widgetRow .Layout .minimumWidth ;
417
418
} else if (preferredWidth > widgetRow .Layout .maximumWidth ) {
418
- widgetRow . Layout . preferredWidth = widgetRow .Layout .maximumWidth ;
419
+ return widgetRow .Layout .maximumWidth ;
419
420
} else {
420
- widgetRow . Layout . preferredWidth = preferredWidth;
421
+ return preferredWidth;
421
422
}
422
423
}
423
424
}
Original file line number Diff line number Diff line change 12
12
"Id" : " com.github.antroids.application-title-bar" ,
13
13
"Name" : " Application Title Bar" ,
14
14
"License" : " GPL-3.0+" ,
15
- "Version" : " 0.6.9 " ,
15
+ "Version" : " 0.7.0 " ,
16
16
"Website" : " https://github.com/antroids/application-title-bar" ,
17
17
"FormFactors" : [
18
18
" desktop"
You can’t perform that action at this time.
0 commit comments