mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 14:36:01 +03:00
Respect icon.height and width in custom button contents
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
ea43ebfe91
commit
93efd2fb78
2 changed files with 10 additions and 0 deletions
|
@ -56,6 +56,8 @@ Button {
|
|||
hovered: root.hovered
|
||||
imageSourceHover: root.imageSourceHover
|
||||
imageSource: root.icon.source
|
||||
imageSourceWidth: root.icon.width
|
||||
imageSourceHeight: root.icon.height
|
||||
text: root.text
|
||||
textColor: root.textColor
|
||||
textColorHovered: root.textColorHovered
|
||||
|
|
|
@ -24,6 +24,8 @@ RowLayout {
|
|||
property bool hovered: false
|
||||
property string imageSourceHover: ""
|
||||
property string imageSource: ""
|
||||
property int imageSourceWidth: 64
|
||||
property int imageSourceHeight: 64
|
||||
property string text: ""
|
||||
property var display
|
||||
|
||||
|
@ -38,6 +40,12 @@ RowLayout {
|
|||
Layout.maximumHeight: root.height
|
||||
|
||||
source: root.hovered ? root.imageSourceHover : root.imageSource
|
||||
|
||||
sourceSize {
|
||||
width: root.imageSourceWidth
|
||||
height: root.imageSourceHeight
|
||||
}
|
||||
|
||||
fillMode: Image.PreserveAspectFit
|
||||
horizontalAlignment: Image.AlignHCenter
|
||||
verticalAlignment: Image.AlignVCenter
|
||||
|
|
Loading…
Reference in a new issue