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