Skip to content

Commit

Permalink
Fix dark/light mode for account menu.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila Ayres <[email protected]>
  • Loading branch information
camilasan committed Sep 11, 2024
1 parent b1812bc commit 789a29e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/gui/tray/UserLine.qml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ AbstractButton {

Image {
id: accountAvatar
Layout.leftMargin: 7
verticalAlignment: Qt.AlignCenter
Layout.leftMargin: Style.accountIconsMenuMargin
verticalAlignment: Qt.AlignCenters
cache: false
source: model.avatar !== "" ? model.avatar : Theme.darkMode ? "image://avatars/fallbackWhite" : "image://avatars/fallbackBlack"
Layout.preferredHeight: Style.accountAvatarSize
Expand Down Expand Up @@ -148,7 +148,7 @@ AbstractButton {

Image {
anchors.fill: parent
source: "image://svgimage-custom-color/more.svg/"
source: "image://svgimage-custom-color/more.svg/" + palette.windowText
fillMode: Image.PreserveAspectFit
}

Expand Down
11 changes: 6 additions & 5 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,12 @@ ApplicationWindow {
spacing: 0

Image {
Layout.leftMargin: 12
verticalAlignment: Qt.AlignCenter
source: "image://svgimage-custom-color/add.svg"
sourceSize.width: Style.headerButtonIconSize
sourceSize.height: Style.headerButtonIconSize
Layout.leftMargin: Style.accountIconsMenuMargin
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignCenter
source: "image://svgimage-custom-color/add.svg/" + palette.windowText
sourceSize.width: Style.addButtonIconSize
sourceSize.height: Style.addButtonIconSize
}
EnforcedPlainTextLabel {
Layout.leftMargin: 14
Expand Down
3 changes: 3 additions & 0 deletions theme/Style/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@ QtObject {
property int addAccountButtonHeight: 50

property int headerButtonIconSize: 32
property int addButtonIconSize: 26
property int dismissButtonSize: 26
property int minimumActivityItemHeight: 24

property int accountIconsMenuMargin: 7

property int activityLabelBaseWidth: 240

property int talkReplyTextFieldPreferredHeight: 34
Expand Down

0 comments on commit 789a29e

Please sign in to comment.