Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 25 additions & 26 deletions panels/notification/osd/displaymode/package/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -126,26 +118,33 @@ AppletItem {
color: itemView.isCurrent ? itemView.D.ColorSelector.checkedBackgroundColor
: itemView.D.ColorSelector.backgroundColor
}
D.BoxShadow {
visible: !itemView.isCurrent
D.InsideBoxBorder {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要阴影了?

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
Copy link

Choose a reason for hiding this comment

The 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.

insideBorderColor and checkedInsideBorderColor are defined on D.InsideBoxBorder, but the binding uses D.ColorSelector.checkedInsideBorderColor / D.ColorSelector.insideBorderColor. Unless ColorSelector is extended elsewhere with these properties, this will resolve to undefined or bypass the local palettes. Either move these properties into D.ColorSelector with the other colors, or bind directly to the local properties (e.g. color: itemView.isCurrent ? checkedInsideBorderColor : insideBorderColor).

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
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The border palette values are defined inline inside the border components, which duplicates styling data and creates extra Palette objects per delegate instance. Consider promoting these palettes to itemView (alongside backgroundColor / checkedBackgroundColor) or extracting a small shared delegate-background component so the Rectangle and borders bind to one source of truth and stay consistent across OSD panels.

Copilot uses AI. Check for mistakes.
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
Copy link

Choose a reason for hiding this comment

The 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.

outsideBorderColor and checkedOutsideBorderColor are defined on D.OutsideBoxBorder, but the binding still points to D.ColorSelector.*. Unless ColorSelector defines these properties, the new palettes won’t be used. Please either add these properties to ColorSelector or bind color directly to the local D.OutsideBoxBorder 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
}
}
}
Expand Down
51 changes: 25 additions & 26 deletions panels/notification/osd/windoweffect/package/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Copy link

Choose a reason for hiding this comment

The 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 insideBorderColor / checkedInsideBorderColor are defined on D.InsideBoxBorder, but the color binding uses D.ColorSelector.*, matching the inconsistent pattern in displaymode/package/main.qml. Please either move these palettes into ColorSelector or bind directly to the local border properties to avoid the mismatch.

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
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inside/outside border palettes are declared inside the border items, which makes the delegate styling harder to maintain and repeats Palette object creation for every row. Prefer defining the border palettes on itemView (or using a shared delegate-background component) and binding the border color to itemView.D.ColorSelector.* so all state colors live in one place.

Copilot uses AI. Check for mistakes.
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
Copy link

Choose a reason for hiding this comment

The 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 outsideBorderColor and checkedOutsideBorderColor are defined on D.OutsideBoxBorder but the color binding uses D.ColorSelector.outsideBorderColor, the new palettes likely won’t apply unless ColorSelector forwards these properties. Please either bind color to the local properties or move the palette definitions into the ColorSelector configuration so they are actually used.

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
}
}
}
Expand Down
Loading