Add more layout fixes

This commit is contained in:
Igor Malinovskiy
2022-07-27 14:03:49 +02:00
parent 1ad586e84a
commit d51b632f9f
7 changed files with 35 additions and 26 deletions
@@ -2,8 +2,8 @@ import QtQuick 2.3
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.13
import QtQuick.Dialogs 1.3
import "./../common/"
import "../common/platformutils.js" as PlatformUtils
BetterDialog {
id: root
@@ -13,6 +13,8 @@ BetterDialog {
property string operationName: bulkOperations.operationName
property int firstColSize: PlatformUtils.isScalingDisabled()? 300 : 250
standardButtons: StandardButton.NoButton
function loadKeys() {
@@ -70,8 +72,8 @@ BetterDialog {
contentItem: Rectangle {
id: contentWrapper
implicitWidth: 900
implicitHeight: 600
implicitWidth: PlatformUtils.isScalingDisabled() ? 1100 : 900
implicitHeight: PlatformUtils.isScalingDisabled() ? 650 : 600
color: sysPalette.base
Control {
@@ -147,7 +149,7 @@ BetterDialog {
BetterLabel {
text: qsTranslate("RESP","Redis Server:")
Layout.preferredWidth: 250
Layout.preferredWidth: root.firstColSize
Layout.preferredHeight: 25
}
@@ -159,7 +161,7 @@ BetterDialog {
BetterLabel {
text: qsTranslate("RESP","Database number:")
Layout.preferredWidth: 250
Layout.preferredWidth: root.firstColSize
Layout.preferredHeight: 25
}
@@ -179,7 +181,7 @@ BetterDialog {
BetterLabel {
id: rdbPathLabel
text: qsTranslate("RESP","Path to RDB file:")
Layout.preferredWidth: 250
Layout.preferredWidth: root.firstColSize
}
FilePathInput {
@@ -201,7 +203,7 @@ BetterDialog {
BetterLabel {
id: rdbDbLabel
text: qsTranslate("RESP","Select DB in RDB file:")
Layout.preferredWidth: 250
Layout.preferredWidth: root.firstColSize
}
BetterSpinBox {
@@ -221,7 +223,7 @@ BetterDialog {
BetterLabel {
text: root.operationName == "rdb_import"? qsTranslate("RESP","Import keys that match <b>regex</b>:") : qsTranslate("RESP","Key pattern:")
Layout.preferredWidth: 250
Layout.preferredWidth: root.firstColSize
}
BetterTextField {
@@ -242,7 +244,7 @@ BetterDialog {
BetterLabel {
text: "New TTL value (seconds):"
Layout.preferredWidth: 250
Layout.preferredWidth: root.firstColSize
}
BetterSpinBox {
@@ -266,7 +268,7 @@ BetterDialog {
visible: bulkOperations.multiConnectionOperation()
BetterLabel {
Layout.preferredWidth: 250
Layout.preferredWidth: root.firstColSize
text: qsTranslate("RESP","Destination Redis Server:")
}
@@ -277,7 +279,7 @@ BetterDialog {
}
BetterLabel {
Layout.preferredWidth: 250
Layout.preferredWidth: root.firstColSize
text: qsTranslate("RESP","Destination Redis Server Database Index:")
}
@@ -300,7 +302,7 @@ BetterDialog {
BetterLabel {
text: "Replace existing keys in target db:"
Layout.preferredWidth: 250
Layout.preferredWidth: root.firstColSize
}
BetterCheckbox {
+2
View File
@@ -12,6 +12,7 @@ BetterButton {
property alias imgSource: img.source
property alias iconSource: img.source
property bool showBorder: false
property bool imgStickTop: false
MouseArea {
id: mouseArea
@@ -23,6 +24,7 @@ BetterButton {
Image {
id: img
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: root.text || root.imgStickTop ? null : parent.verticalCenter
source: PlatformUtils.getThemeIcon("clear.svg")
width: 18
height: 18
+5
View File
@@ -1,6 +1,11 @@
var dateTimeFormat = "yyyy-MM-dd hh:mm:ss.zzz"
function isScalingDisabled() {
return (Qt.platform.os == "windows" || Qt.platform.os == "linux")
&& screen.devicePixelRatio < 2
}
function isWindows() {
return Qt.platform.os == "windows"
}
@@ -111,7 +111,7 @@ BetterDialog {
contentItem: Rectangle {
color: sysPalette.base
implicitWidth: 650
implicitWidth: PlatformUtils.isScalingDisabled() ? 900 : 650
implicitHeight: {
if (screen.devicePixelRatio === 1) {
return connectionSettingsTabBar.implicitHeight
+3 -2
View File
@@ -95,8 +95,8 @@ Repeater {
Layout.fillWidth: true
property int tileSize: PlatformUtils.isOSX()? 100 : 120
property int tileIconSize: 64
property int tileSize: PlatformUtils.isScalingDisabled()? 150 : 110
property int tileIconSize: PlatformUtils.isScalingDisabled()? 90 : 75
ImageButton {
objectName: "rdm_server_action_info"
@@ -108,6 +108,7 @@ Repeater {
tooltip: qsTranslate("RESP", "View Server Info")
showBorder: true
imgStickTop: true
imgWidth: tileGrid.tileIconSize
imgHeight: tileGrid.tileIconSize
+8 -9
View File
@@ -18,8 +18,8 @@ BetterDialog {
contentItem: Rectangle {
id: dialogRoot
implicitWidth: 950
implicitHeight: 550
implicitWidth: PlatformUtils.isScalingDisabled() ? 1100 : 950
implicitHeight: PlatformUtils.isScalingDisabled() ? 650 : 550
color: sysPalette.base
@@ -59,8 +59,8 @@ BetterDialog {
rows: 3
flow: GridLayout.TopToBottom
Layout.fillWidth: true
rowSpacing: 10
columnSpacing: 15
rowSpacing: PlatformUtils.isScalingDisabled() ? 20 : 10
columnSpacing: PlatformUtils.isScalingDisabled() ? 20 : 15
ComboboxOption {
id: appLang
@@ -160,9 +160,8 @@ BetterDialog {
columns: 2
rows: 2
flow: GridLayout.TopToBottom
rowSpacing: 10
columnSpacing: 15
rowSpacing: PlatformUtils.isScalingDisabled() ? 20 : 10
columnSpacing: PlatformUtils.isScalingDisabled() ? 20 : 15
ComboboxOption {
id: valueEditorFont
@@ -224,8 +223,8 @@ BetterDialog {
columns: 2
rows: 4
flow: GridLayout.TopToBottom
rowSpacing: 10
columnSpacing: 20
rowSpacing: PlatformUtils.isScalingDisabled() ? 20 : 10
columnSpacing: PlatformUtils.isScalingDisabled() ? 20 : 15
BoolOption {
id: nsOnTop
+2 -2
View File
@@ -31,9 +31,9 @@ Item {
}
Text {
color: "#cccccc"
color: disabledSysPalette.text
text: root.description
visible: !!text
visible: root.description
}
}