Changeset View
Changeset View
Standalone View
Standalone View
applets/calculator/package/contents/ui/calculator.qml
Show All 30 Lines | |||||
31 | import org.kde.kquickcontrolsaddons 2.0 as QtExtra | 31 | import org.kde.kquickcontrolsaddons 2.0 as QtExtra | ||
32 | import org.kde.plasma.plasmoid 2.0 | 32 | import org.kde.plasma.plasmoid 2.0 | ||
33 | 33 | | |||
34 | QQC2.Control { | 34 | QQC2.Control { | ||
35 | id: main; | 35 | id: main; | ||
36 | 36 | | |||
37 | Plasmoid.switchWidth: Layout.minimumWidth | 37 | Plasmoid.switchWidth: Layout.minimumWidth | ||
38 | Plasmoid.switchHeight: Layout.minimumHeight | 38 | Plasmoid.switchHeight: Layout.minimumHeight | ||
39 | Layout.minimumWidth: mainLayout.Layout.minimumWidth + 8 | 39 | Layout.minimumWidth: 150 | ||
40 | Layout.minimumHeight: mainLayout.Layout.minimumHeight + 8 | 40 | Layout.minimumHeight: 225 | ||
41 | 41 | | |||
42 | width: units.gridSize * 3 | 42 | width: units.gridSize * 3 | ||
broulik: Maybe just fixing this to be `units.gridUnit` times some larger value could fix the initial… | |||||
ngraham: I tried that earlier, but while it works for the expanded version when the widget is in the… | |||||
43 | height: units.gridSize * 4 | 43 | height: units.gridSize * 4 | ||
44 | 44 | | |||
45 | // Make the buttons' text labels scale with the widget's size | 45 | // Make the buttons' text labels scale with the widget's size | ||
46 | // This is propagated down to all child controls with text | 46 | // This is propagated down to all child controls with text | ||
47 | font.pixelSize: Math.round(width/12) | 47 | font.pixelSize: Math.round(width/12) | ||
48 | 48 | | |||
49 | property real result: 0; | 49 | property real result: 0; | ||
50 | property bool hasResult: false; | 50 | property bool hasResult: false; | ||
▲ Show 20 Lines • Show All 434 Lines • Show Last 20 Lines |
Maybe just fixing this to be units.gridUnit times some larger value could fix the initial sizing