mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 02:35:57 +08:00
Fix margins
The margin around the icon didn't work if the icon source was none, because it was provided a QSize rather than a real. The margin around the background didn't work at all because the background is automatically adjusted to fill the parent element, so it's best left out. Contributes to issue CURA-8009.
This commit is contained in:
parent
7fdf1dbdd4
commit
3d6601a37e
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2019 Ultimaker B.V.
|
// Copyright (c) 2021 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
@ -24,7 +24,7 @@ TextField
|
|||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
leftPadding: iconLeft.visible ? iconLeft.width + UM.Theme.getSize("default_margin").width * 2 : UM.Theme.getSize("thin_margin")
|
leftPadding: iconLeft.visible ? iconLeft.width + UM.Theme.getSize("default_margin").width * 2 : UM.Theme.getSize("thin_margin").width
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
State
|
State
|
||||||
@ -55,7 +55,6 @@ TextField
|
|||||||
|
|
||||||
color: UM.Theme.getColor("main_background")
|
color: UM.Theme.getColor("main_background")
|
||||||
|
|
||||||
anchors.margins: Math.round(UM.Theme.getSize("default_lining").width)
|
|
||||||
radius: UM.Theme.getSize("setting_control_radius").width
|
radius: UM.Theme.getSize("setting_control_radius").width
|
||||||
|
|
||||||
border.color:
|
border.color:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user