better disabled look
This commit is contained in:
parent
286fa96686
commit
91ad79a553
@ -41,6 +41,7 @@ QtQuickControlStyle.RadioButtonStyle {
|
||||
imagePath: "widgets/actionbutton"
|
||||
}
|
||||
elementId: "normal"
|
||||
opacity: control.enabled ? 1 : 0.6
|
||||
|
||||
width: height
|
||||
height: theme.mSize(theme.defaultFont).height * 1.6
|
||||
|
@ -42,6 +42,7 @@ QtQuickControlStyle.SliderStyle {
|
||||
handle: Item {
|
||||
width: handle.naturalSize.width
|
||||
height: handle.naturalSize.height
|
||||
//keep this opaque to not show half highlight beneath
|
||||
Private.RoundShadow {
|
||||
id: shadow
|
||||
anchors.fill: parent
|
||||
@ -65,6 +66,7 @@ QtQuickControlStyle.SliderStyle {
|
||||
prefix: "groove"
|
||||
height: implicitHeight
|
||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||
opacity: control.enabled ? 1 : 0.6
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
id: highlight
|
||||
@ -76,7 +78,7 @@ QtQuickControlStyle.SliderStyle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||
|
||||
visible: value > 0 && slider.enabled
|
||||
visible: value > 0
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,6 +93,7 @@ QtQuickControlStyle.SliderStyle {
|
||||
//Position ticklines from styleData.handleWidth to width - styleData.handleWidth/2
|
||||
//position them at an half handle width increment
|
||||
x: styleData.handleWidth / 2 + index * ((repeater.width - styleData.handleWidth) / (repeater.count>1 ? repeater.count-1 : 1))
|
||||
opacity: control.enabled ? 1 : 0.6
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ import "private" as Private
|
||||
QtQuickControlStyle.TextFieldStyle {
|
||||
id: root
|
||||
|
||||
textColor: theme.viewTextColor
|
||||
textColor: control.enabled ? theme.viewTextColor : Qt.rgba(theme.viewTextColor.r, theme.viewTextColor.g, theme.viewTextColor.b, 0.6)
|
||||
selectionColor: theme.viewFocusColor
|
||||
selectedTextColor: theme.viewBackgroundColor
|
||||
placeholderTextColor: Qt.rgba(theme.viewTextColor.r, theme.viewTextColor.g, theme.viewTextColor.b, 0.5)
|
||||
@ -50,6 +50,7 @@ QtQuickControlStyle.TextFieldStyle {
|
||||
|
||||
implicitHeight: Math.max(theme.mSize(theme.defaultFont).height * 1.6, theme.mSize(theme.defaultFont).height + base.margins.top + base.margins.bottom)
|
||||
implicitWidth: theme.mSize(theme.defaultFont).width * 12
|
||||
opacity: control.enabled ? 1 : 0.6
|
||||
|
||||
Private.TextFieldFocus {
|
||||
id: hover
|
||||
|
@ -121,7 +121,7 @@ QtQuickControlStyle.ButtonStyle {
|
||||
}
|
||||
|
||||
background: {
|
||||
if (control.text.length == 0 && (control.parent && control.parent.checkedButton === undefined) && !style.flat && !control.menu) {
|
||||
if (control.text.length == 0 && (control.parent && (control.parent.spacing === undefined || control.parent.spacing !== 0)) && !style.flat && !control.menu) {
|
||||
return roundButtonComponent
|
||||
} else {
|
||||
return buttonComponent
|
||||
@ -233,7 +233,7 @@ QtQuickControlStyle.ButtonStyle {
|
||||
enabledBorders: {
|
||||
if (style.flat || !control.parent ||
|
||||
control.parent.width < control.parent.implicitWidth ||
|
||||
control.parent.checkedButton === undefined ||
|
||||
control.parent.spacing !== 0 ||
|
||||
!bordersSvg.hasElement("pressed-hint-compose-over-border")) {
|
||||
if (shadows !== null) {
|
||||
shadows.destroy()
|
||||
|
Loading…
Reference in New Issue
Block a user