Optimize about window

pull/19/head
reionwong 5 years ago
parent a3adc82313
commit 3d0c6f0eb1

@ -8,7 +8,10 @@ FishUI.Window {
id: control id: control
width: 300 width: 300
height: 300 height: contentHeight
maximumHeight: contentHeight
minimumHeight: contentHeight
modality: Qt.WindowModal modality: Qt.WindowModal
@ -17,10 +20,19 @@ FishUI.Window {
property var iconSource property var iconSource
property string name property string name
property string description property string description
property var contentHeight: _mainLayout.implicitHeight + control.header.height * 2
DragHandler {
target: null
acceptedDevices: PointerDevice.GenericPointer
grabPermissions: PointerHandler.CanTakeOverFromItems | PointerHandler.CanTakeOverFromHandlersOfDifferentType | PointerHandler.ApprovesTakeOverByAnything
onActiveChanged: if (active) { control.helper.startSystemMove(control) }
}
ColumnLayout { ColumnLayout {
id: _mainLayout
anchors.fill: parent anchors.fill: parent
anchors.topMargin: FishUI.Units.largeSpacing * 2 anchors.bottomMargin: control.header.height
Image { Image {
width: 64 width: 64
@ -31,12 +43,13 @@ FishUI.Window {
} }
Item { Item {
height: FishUI.Units.largeSpacing * 2 height: FishUI.Units.largeSpacing
} }
Label { Label {
text: control.name text: control.name
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
font.pointSize: 14
} }
Label { Label {

@ -41,7 +41,7 @@ QtObject {
property color secondBackgroundColor: darkMode ? "#2C2C2D" : "#FFFFFF" property color secondBackgroundColor: darkMode ? "#2C2C2D" : "#FFFFFF"
property color alternateBackgroundColor: darkMode ? "#3C3C3D" : "#F2F4F5" property color alternateBackgroundColor: darkMode ? "#3C3C3D" : "#F2F4F5"
property color textColor: darkMode ? "#FFFFFF" : "#4E5668" property color textColor: darkMode ? "#FFFFFF" : "#323238"
property color disabledTextColor: darkMode ? "#888888" : "#64646E" property color disabledTextColor: darkMode ? "#888888" : "#64646E"
property color highlightColor: FishUICore.ThemeManager.accentColor property color highlightColor: FishUICore.ThemeManager.accentColor

Loading…
Cancel
Save