Fix DeviceSection number vertical alignment

This commit is contained in:
miruka 2020-06-25 11:26:21 -04:00
parent dcc634be04
commit 3001131ffa
2 changed files with 14 additions and 5 deletions

12
TODO.md
View File

@ -1,15 +1,19 @@
# TODO # TODO
- sessions page size - sessions page size
- menu click-through padding to close it easily
- clear listview checked on message clear
- unregister popup/menu when destroyed without being closed
- flickshortcuts - flickshortcuts
- avatar upload/change component - avatar upload/change component
- show scrollbars for a few secs if there's content to scroll on beginning - show scrollbars for a few secs if there's content to scroll on beginning
- can leave room with a reason?
- field/area focus line in popups weird - field/area focus line in popups weird
- clear listview checked on message clear
- unregister popup/menu when destroyed without being closed
- menu click-through padding to close it easily
- can leave room with a reason?
- use new nio `restore_login()` - use new nio `restore_login()`
- verify all popups and boxes work: enter/esc, tab focus, operations - verify all popups and boxes work: enter/esc, tab focus, operations
## Refactoring ## Refactoring

View File

@ -15,8 +15,8 @@ HRowLayout {
readonly property int sectionTotalCount: readonly property int sectionTotalCount:
deviceList.sectionItemCounts[section] || 0 deviceList.sectionItemCounts[section] || 0
HCheckBox { HCheckBox {
id: checkBox
padding: theme.spacing padding: theme.spacing
topPadding: padding * (section === "current" ? 1 : 2) topPadding: padding * (section === "current" ? 1 : 2)
@ -62,7 +62,10 @@ HRowLayout {
.arg(sectionCheckedCount).arg(sectionTotalCount) : .arg(sectionCheckedCount).arg(sectionTotalCount) :
sectionTotalCount sectionTotalCount
topPadding: checkBox.topPadding - theme.spacing * 0.75
rightPadding: theme.spacing * 1.5 rightPadding: theme.spacing * 1.5
verticalAlignment: Qt.AlignVCenter
color: color:
section === "current" || section === "verified" ? section === "current" || section === "verified" ?
theme.colors.positiveText : theme.colors.positiveText :
@ -71,5 +74,7 @@ HRowLayout {
theme.colors.warningText : theme.colors.warningText :
theme.colors.errorText theme.colors.errorText
Layout.fillHeight: true
} }
} }