-
Notifications
You must be signed in to change notification settings - Fork 60
style: replace shadows with borders in OSD notifications #1441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,15 +64,7 @@ AppletItem { | |
| } | ||
| property D.Palette checkedBackgroundColor: D.Palette { | ||
| normal: Qt.rgba(1, 1, 1, 0.6) | ||
| normalDark: Qt.rgba(0, 0, 0, 0.6) | ||
| } | ||
| property D.Palette dropShadowColor: D.Palette { | ||
| normal: Qt.rgba(0, 0, 0, 0.1) | ||
| normalDark: Qt.rgba(0, 0, 0, 0.7) | ||
| } | ||
| property D.Palette innerShadowColor: D.Palette { | ||
| normal: Qt.rgba(1, 1, 1, 0.2) | ||
| normalDark: Qt.rgba(1, 1, 1, 0.03) | ||
| normalDark: Qt.rgba(0, 0, 0, 0.5) | ||
| } | ||
|
|
||
| property bool isCurrent: Applet.currentPlanItem && Applet.currentPlanItem.key === model.key | ||
|
|
@@ -126,26 +118,33 @@ AppletItem { | |
| color: itemView.isCurrent ? itemView.D.ColorSelector.checkedBackgroundColor | ||
| : itemView.D.ColorSelector.backgroundColor | ||
| } | ||
| D.BoxShadow { | ||
| visible: !itemView.isCurrent | ||
| D.InsideBoxBorder { | ||
| property D.Palette insideBorderColor: D.Palette { | ||
| normal: Qt.rgba(1, 1, 1, 0.1) | ||
| normalDark: Qt.rgba(1, 1, 1, 0.05) | ||
| } | ||
| property D.Palette checkedInsideBorderColor: D.Palette { | ||
| normal: Qt.rgba(1, 1, 1, 0.15) | ||
| normalDark: Qt.rgba(1, 1, 1, 0.08) | ||
| } | ||
| radius: backgroundRect.radius | ||
|
Comment on lines
+121
to
+130
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): ColorSelector references for inside border palettes appear to be undefined or misplaced.
|
||
| anchors.fill: parent | ||
| shadowOffsetX: 0 | ||
| shadowOffsetY: 1 | ||
| shadowColor: itemView.D.ColorSelector.dropShadowColor | ||
| shadowBlur: 1 | ||
| cornerRadius: backgroundRect.radius | ||
| spread: 0 | ||
| hollow: true | ||
| color: itemView.isCurrent ? D.ColorSelector.checkedInsideBorderColor | ||
| : D.ColorSelector.insideBorderColor | ||
| } | ||
| D.BoxInsetShadow { | ||
| visible: !itemView.isCurrent | ||
| D.OutsideBoxBorder { | ||
| property D.Palette outsideBorderColor: D.Palette { | ||
| normal: Qt.rgba(0, 0, 0, 0.05) | ||
| normalDark: Qt.rgba(0, 0, 0, 0.4) | ||
| } | ||
| property D.Palette checkedOutsideBorderColor: D.Palette { | ||
|
Comment on lines
+121
to
+140
|
||
| normal: Qt.rgba(0, 0, 0, 0.1) | ||
| normalDark: Qt.rgba(0, 0, 0, 0.45) | ||
| } | ||
| radius: backgroundRect.radius | ||
|
Comment on lines
+135
to
+144
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): Outside border palettes are defined on the border item but bound via ColorSelector, which likely has no such properties.
|
||
| anchors.fill: parent | ||
| shadowOffsetX: 0 | ||
| shadowOffsetY: 1 | ||
| shadowBlur: 1 | ||
| spread: 0 | ||
| cornerRadius: backgroundRect.radius | ||
| shadowColor: itemView.D.ColorSelector.innerShadowColor | ||
| color: itemView.isCurrent ? D.ColorSelector.checkedOutsideBorderColor | ||
| : D.ColorSelector.outsideBorderColor | ||
| } | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,15 +95,7 @@ AppletItem { | |
| } | ||
| property D.Palette checkedBackgroundColor: D.Palette { | ||
| normal: Qt.rgba(1, 1, 1, 0.6) | ||
| normalDark: Qt.rgba(0, 0, 0, 0.6) | ||
| } | ||
| property D.Palette dropShadowColor: D.Palette { | ||
| normal: Qt.rgba(0, 0, 0, 0.1) | ||
| normalDark: Qt.rgba(0, 0, 0, 0.7) | ||
| } | ||
| property D.Palette innerShadowColor: D.Palette { | ||
| normal: Qt.rgba(1, 1, 1, 0.2) | ||
| normalDark: Qt.rgba(1, 1, 1, 0.03) | ||
| normalDark: Qt.rgba(0, 0, 0, 0.5) | ||
| } | ||
|
|
||
| contentItem: RowLayout { | ||
|
|
@@ -175,26 +167,33 @@ AppletItem { | |
| color: itemView.isCurrent ? itemView.D.ColorSelector.checkedBackgroundColor | ||
| : itemView.D.ColorSelector.backgroundColor | ||
| } | ||
| D.BoxShadow { | ||
| visible: !itemView.isCurrent | ||
| D.InsideBoxBorder { | ||
| property D.Palette insideBorderColor: D.Palette { | ||
| normal: Qt.rgba(1, 1, 1, 0.1) | ||
| normalDark: Qt.rgba(1, 1, 1, 0.05) | ||
| } | ||
| property D.Palette checkedInsideBorderColor: D.Palette { | ||
| normal: Qt.rgba(1, 1, 1, 0.15) | ||
| normalDark: Qt.rgba(1, 1, 1, 0.08) | ||
| } | ||
| radius: backgroundRect.radius | ||
|
Comment on lines
+170
to
+179
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): Same potential mismatch between local inside border palettes and ColorSelector references as in displaymode. The palettes |
||
| anchors.fill: parent | ||
| shadowOffsetX: 0 | ||
| shadowOffsetY: 1 | ||
| shadowColor: itemView.D.ColorSelector.dropShadowColor | ||
| shadowBlur: 1 | ||
| cornerRadius: backgroundRect.radius | ||
| spread: 0 | ||
| hollow: true | ||
| color: itemView.isCurrent ? D.ColorSelector.checkedInsideBorderColor | ||
| : D.ColorSelector.insideBorderColor | ||
| } | ||
| D.BoxInsetShadow { | ||
| visible: !itemView.isCurrent | ||
| D.OutsideBoxBorder { | ||
| property D.Palette outsideBorderColor: D.Palette { | ||
| normal: Qt.rgba(0, 0, 0, 0.05) | ||
| normalDark: Qt.rgba(0, 0, 0, 0.4) | ||
| } | ||
| property D.Palette checkedOutsideBorderColor: D.Palette { | ||
|
Comment on lines
+170
to
+189
|
||
| normal: Qt.rgba(0, 0, 0, 0.1) | ||
| normalDark: Qt.rgba(0, 0, 0, 0.45) | ||
| } | ||
| radius: backgroundRect.radius | ||
|
Comment on lines
+184
to
+193
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): Outside border color binding likely does not use the newly defined palettes on the border item. Because |
||
| anchors.fill: parent | ||
| shadowOffsetX: 0 | ||
| shadowOffsetY: 1 | ||
| shadowBlur: 1 | ||
| spread: 0 | ||
| cornerRadius: backgroundRect.radius | ||
| shadowColor: itemView.D.ColorSelector.innerShadowColor | ||
| color: itemView.isCurrent ? D.ColorSelector.checkedOutsideBorderColor | ||
| : D.ColorSelector.outsideBorderColor | ||
| } | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要阴影了?