Give the picked Elsewhen city one bright highlight (#13452)
A row lit itself by lifting its own time-of-day fill, so a picked night row could read darker than the daytime rows around it. The picked city now takes midday's lifted fill, the brightest, whatever its time of day; hover still lifts each row from its own. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
944fa24fd1
commit
ed5837a05b
1 file changed
+10
-4
@@ -29,12 +29,14 @@ Rectangle {
|
||||
readonly property bool dragged: panel.dragIndex === index
|
||||
|
||||
// Lightest at midday, darkest at night, so the list dims into the small hours.
|
||||
readonly property real dayFill: 0.10
|
||||
readonly property real phaseFill: {
|
||||
var p = ready ? rowData.phase : "day"
|
||||
if (p === "day") return 0.10
|
||||
if (p === "day") return dayFill
|
||||
if (p === "night") return 0.035
|
||||
return 0.07
|
||||
}
|
||||
readonly property real hoverLift: 0.05
|
||||
|
||||
readonly property int pad: Style.space(15)
|
||||
readonly property int stripGap: Style.space(9)
|
||||
@@ -45,9 +47,13 @@ Rectangle {
|
||||
implicitHeight: (pad - panel.capGap) + rowLabels.implicitHeight + stripGap + strip.trackHeight + pad
|
||||
radius: Style.cornerRadius
|
||||
// Opaque: knocked-aside rows pass over one another and over the globe.
|
||||
// The picked city lights up like a hovered one, so the arrow keys show where they are.
|
||||
readonly property bool lit: rowHover.hovered || (panel.focusIndex === index && !panel.addSelected)
|
||||
color: Model.mix(Color.popups.background, foreground, lit ? phaseFill + 0.05 : phaseFill)
|
||||
// Hover lifts a row from its own time of day. The picked city takes the
|
||||
// brightest lifted fill whatever its time of day, so a night row picked by the
|
||||
// arrow keys never reads darker than the daytime rows around it.
|
||||
readonly property bool picked: panel.focusIndex === index && !panel.addSelected
|
||||
readonly property bool lit: rowHover.hovered || picked
|
||||
color: Model.mix(Color.popups.background, foreground,
|
||||
picked ? dayFill + hoverLift : rowHover.hovered ? phaseFill + hoverLift : phaseFill)
|
||||
|
||||
// Transforms leave the Column's layout alone: the knock that clears the
|
||||
// globe's way, then the drag offset.
|
||||
|
||||
Reference in new issue
Block a user