mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 19:45:51 +08:00
adjusted style of hover and button sizes (#10739)
adjusted style of hover and button sizes Co-authored-by: Jaime van Kessel <nallath@gmail.com>
This commit is contained in:
parent
51434eda1b
commit
2cdda695e9
@ -10,18 +10,17 @@ import QtQuick.Controls 2.15
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: root
|
id: root
|
||||||
width: childrenRect.width
|
width: UM.Theme.getSize("button_icon").width
|
||||||
height: childrenRect.height
|
height: UM.Theme.getSize("button_icon").height
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
property color borderColor: hovered ? UM.Theme.getColor("primary") : "transparent"
|
|
||||||
property color backgroundColor: hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
property color backgroundColor: hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
||||||
|
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
color: backgroundColor
|
color: backgroundColor
|
||||||
border.color: borderColor
|
border.color: transparent
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
radius: Math.round(width * 0.5)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.ToolTip
|
Cura.ToolTip
|
||||||
@ -41,5 +40,7 @@ Button
|
|||||||
|
|
||||||
color: UM.Theme.getColor("icon")
|
color: UM.Theme.getColor("icon")
|
||||||
source: UM.Theme.getIcon("Settings")
|
source: UM.Theme.getIcon("Settings")
|
||||||
|
anchors.centerIn: parent
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,18 +94,20 @@ Window
|
|||||||
id: pageSelectionTabBar
|
id: pageSelectionTabBar
|
||||||
anchors.right: managePackagesButton.left
|
anchors.right: managePackagesButton.left
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
height: UM.Theme.getSize("button_icon").height
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
PackageTypeTab
|
PackageTypeTab
|
||||||
{
|
{
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
|
padding: UM.Theme.getSize("default_margin").width/2
|
||||||
text: catalog.i18nc("@button", "Plugins")
|
text: catalog.i18nc("@button", "Plugins")
|
||||||
onClicked: content.source = "Plugins.qml"
|
onClicked: content.source = "Plugins.qml"
|
||||||
}
|
}
|
||||||
PackageTypeTab
|
PackageTypeTab
|
||||||
{
|
{
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
|
padding: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||||
text: catalog.i18nc("@button", "Materials")
|
text: catalog.i18nc("@button", "Materials")
|
||||||
onClicked: content.source = "Materials.qml"
|
onClicked: content.source = "Materials.qml"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user