mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-28 21:31:15 -07:00
Use Cura.MenuItem instead of UM.MenuItem
I didn't realise that Cura already had a menu item. To prevent Confusion, i've changed Cura.MenuItem to use UM.MenuItem and let all other menus use Cura.MenuItem
This commit is contained in:
parent
bab9311284
commit
3130ea0f74
17 changed files with 96 additions and 128 deletions
|
|
@ -4,18 +4,17 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.1 as UM
|
||||
import UM 1.5 as UM
|
||||
|
||||
//
|
||||
// MenuItem with Cura styling.
|
||||
//
|
||||
MenuItem
|
||||
UM.MenuItem
|
||||
{
|
||||
id: menuItem
|
||||
|
||||
implicitHeight: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("narrow_margin").height
|
||||
opacity: enabled ? 1.0 : 0.5
|
||||
height: visible ? implicitHeight : 0
|
||||
|
||||
arrow: UM.RecolorImage
|
||||
{
|
||||
|
|
@ -42,20 +41,8 @@ MenuItem
|
|||
color: UM.Theme.getColor("setting_control_text")
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
leftPadding: menuItem.checkable ? menuItem.indicator.width + UM.Theme.getSize("default_margin").width : UM.Theme.getSize("thin_margin").width
|
||||
rightPadding: menuItem.subMenu ? menuItem.arrow.width + UM.Theme.getSize("default_margin").width : UM.Theme.getSize("thin_margin").width
|
||||
text: menuItem.text
|
||||
|
||||
textFormat: Text.PlainText
|
||||
renderType: Text.NativeRendering
|
||||
color: UM.Theme.getColor("setting_control_text")
|
||||
font: UM.Theme.getFont("default")
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
background: Rectangle
|
||||
{
|
||||
x: UM.Theme.getSize("default_lining").width
|
||||
y: UM.Theme.getSize("default_lining").width
|
||||
width: menuItem.width - 2 * UM.Theme.getSize("default_lining").width
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue