diff options
Diffstat (limited to 'src/dialogs/DefaultColorDialog.qml')
-rw-r--r-- | src/dialogs/DefaultColorDialog.qml | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/dialogs/DefaultColorDialog.qml b/src/dialogs/DefaultColorDialog.qml index 6cd1eda9..7188010e 100644 --- a/src/dialogs/DefaultColorDialog.qml +++ b/src/dialogs/DefaultColorDialog.qml @@ -40,6 +40,7 @@ import QtQuick 2.4 import QtQuick.Controls 1.2 +import QtQuick.Controls.Private 1.0 import QtQuick.Dialogs 1.0 import QtQuick.Window 2.1 import "qml" @@ -61,9 +62,8 @@ AbstractColorDialog { Rectangle { id: content - property int maxSize: 0.9 * Math.min(Screen.desktopAvailableWidth, Screen.desktopAvailableHeight) - implicitHeight: Math.min(maxSize, Screen.pixelDensity * (usePaletteMap ? 100 : 50)) - implicitWidth: usePaletteMap ? implicitHeight - bottomMinHeight : implicitHeight * 1.5 + implicitHeight: Math.min(root.__maximumDimension, Screen.pixelDensity * (usePaletteMap ? 120 : 50)) + implicitWidth: Math.min(root.__maximumDimension, usePaletteMap ? Screen.pixelDensity * (usePaletteMap ? 100 : 50) : implicitHeight * 1.5) color: palette.window focus: root.visible property real bottomMinHeight: sliders.height + buttonRow.height + outerSpacing * 3 @@ -99,9 +99,6 @@ AbstractColorDialog { } } - // set the preferred width based on height, to avoid "letterboxing" the paletteMap - onHeightChanged: implicitHeight = Math.max((usePaletteMap ? 480 : bottomMinHeight), height) - SystemPalette { id: palette } Item { @@ -276,7 +273,6 @@ AbstractColorDialog { right: parent.right margins: content.outerSpacing } - spacing: content.spacing ColorSlider { id: hueSlider @@ -371,7 +367,8 @@ AbstractColorDialog { } Row { spacing: content.spacing - height: parent.height + height: visible ? parent.height : 0 + visible: !Settings.isMobile TextField { id: colorField text: root.currentColor.toString() |