Skip to content

Commit

Permalink
chore: hide edit button when item count < 2
Browse files Browse the repository at this point in the history
- hide/show edit button on item count changed
- edit button font size 12px

pms: Bug-297629
  • Loading branch information
kegechen committed Dec 25, 2024
1 parent d291a08 commit efa159c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plugin-accounts/qml/AccountSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ DccObject {
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Layout.rightMargin: 10
text: groupSettings.isEditing ? qsTr("done") : qsTr("edit")
font.pointSize: 13
font.pointSize: 12
background: null
textColor: Palette {
normal {
Expand Down
8 changes: 6 additions & 2 deletions src/plugin-datetime/qml/LangAndFormat.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ DccObject {
Button {
id: button
checkable: true
visible: langRepeater.count > 1
font.pointSize: 12
checked: languageListTiltle.isEditing
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Layout.rightMargin: 10
Expand Down Expand Up @@ -66,6 +68,7 @@ DccObject {
onParentItemChanged: item => { if (item) item.topPadding = 10 }

DccRepeater {
id: langRepeater
model: dccData.langList
delegate: DccObject {
name: "languageItem" + index
Expand Down Expand Up @@ -230,7 +233,7 @@ DccObject {
IconLabel {
Layout.alignment: Qt.AlignRight | Qt.AlignHCenter
icon.name: "arrow_ordinary_right"
icon.palette: DTK.makeIconPalette(palette)
icon.palette: DTK.makeIconPalette(regionLabel.palette)
icon.mode: ColorSelector.controlState
icon.theme: ColorSelector.controlTheme
}
Expand Down Expand Up @@ -279,12 +282,13 @@ DccObject {
RowLayout {
id: layout
Label {
id: currentLabel
text: dccData.currentLanguageAndRegion
}
IconLabel {
Layout.alignment: Qt.AlignRight | Qt.AlignHCenter
icon.name: "arrow_ordinary_right"
icon.palette: DTK.makeIconPalette(palette)
icon.palette: DTK.makeIconPalette(currentLabel.palette)
icon.mode: ColorSelector.controlState
icon.theme: ColorSelector.controlTheme
}
Expand Down
3 changes: 2 additions & 1 deletion src/plugin-keyboard/qml/KeyboardLayout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ DccObject {
D.Button {
id: button
checkable: true
visible: dccData.layoutCount > 1
checked: keyboardLayoutTitle.isEditing
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Layout.rightMargin: 10
text: keyboardLayoutTitle.isEditing ? qsTr("done") : qsTr("edit")
font.pointSize: 13
font.pointSize: 12
background: null
textColor: D.Palette {
normal {
Expand Down
2 changes: 1 addition & 1 deletion src/plugin-keyboard/qml/Shortcuts.qml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ DccObject {
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Layout.rightMargin: 10
text: shortcutSettingsBody.isEditing ? qsTr("done") : qsTr("edit")
font.pointSize: 13
font.pointSize: 12
background: null
textColor: D.Palette {
normal {
Expand Down

0 comments on commit efa159c

Please sign in to comment.