mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00: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
@ -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 New Issue
Block a user