Give Elsewhen remove buttons a circular corner bubble (#14258)
This commit is contained in:
1 parent
65c0f3306e
commit
ec76c070d2
2 files changed
+18
-8
No files matched your search
@@ -83,7 +83,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
z: dragged ? 2 : 0
|
z: dragged ? 2 : lit ? 1 : 0
|
||||||
opacity: dragged ? 0.9 : 1
|
opacity: dragged ? 0.9 : 1
|
||||||
Behavior on opacity { NumberAnimation { duration: Style.duration(120) } }
|
Behavior on opacity { NumberAnimation { duration: Style.duration(120) } }
|
||||||
|
|
||||||
@@ -291,18 +291,23 @@ Rectangle {
|
|||||||
|
|
||||||
// The last city stays; removing it would leave no way back.
|
// The last city stays; removing it would leave no way back.
|
||||||
PanelActionButton {
|
PanelActionButton {
|
||||||
anchors.right: parent.right
|
id: removeButton
|
||||||
anchors.top: parent.top
|
anchors.horizontalCenter: parent.right
|
||||||
anchors.margins: Style.space(1)
|
anchors.horizontalCenterOffset: -Style.space(22) * 5 / 24
|
||||||
|
anchors.verticalCenter: parent.top
|
||||||
|
size: fontSize + (Style.space(22) - fontSize) * 0.85
|
||||||
|
radius: size / 2
|
||||||
|
color: Model.mix(Color.popups.background, row.foreground, _hot ? 0.24 : 0.14)
|
||||||
|
borderSpec: Border.flat(Model.mix(Color.popups.background, row.foreground, _hot ? 0.65 : 0.35), Style.space(1))
|
||||||
iconText: "\u00d7"
|
iconText: "\u00d7"
|
||||||
tooltipText: "Remove"
|
tooltipText: "Remove"
|
||||||
foreground: row.fainter
|
foreground: row.dim
|
||||||
hoverColor: row.foreground
|
hoverColor: row.foreground
|
||||||
fontFamily: row.fontFamily
|
fontFamily: row.fontFamily
|
||||||
fontSize: Style.font.bodySmall
|
fontSize: Style.font.bodySmall
|
||||||
enabled: row.removable
|
enabled: row.removable
|
||||||
// Shown on the keyboard's pick too, so Delete's target is plain.
|
// Shown on the keyboard's pick too, so Delete's target is plain.
|
||||||
opacity: row.removable && row.lit ? 1 : 0
|
opacity: row.removable && (row.lit || removeButton._hot) ? 1 : 0
|
||||||
visible: opacity > 0
|
visible: opacity > 0
|
||||||
Behavior on opacity { NumberAnimation { duration: Style.duration(120) } }
|
Behavior on opacity { NumberAnimation { duration: Style.duration(120) } }
|
||||||
onClicked: row.panel.removeCityAt(row.index)
|
onClicked: row.panel.removeCityAt(row.index)
|
||||||
|
|||||||
@@ -777,6 +777,7 @@ Panel {
|
|||||||
Flickable {
|
Flickable {
|
||||||
id: scroller
|
id: scroller
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
anchors.rightMargin: -Style.space(12)
|
||||||
clip: true
|
clip: true
|
||||||
interactive: false
|
interactive: false
|
||||||
contentWidth: width
|
contentWidth: width
|
||||||
@@ -821,7 +822,7 @@ Panel {
|
|||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: content
|
id: content
|
||||||
width: scroller.width
|
width: scroller.width - Style.space(12)
|
||||||
spacing: Style.spacing.panelGap
|
spacing: Style.spacing.panelGap
|
||||||
|
|
||||||
HeroTitle {
|
HeroTitle {
|
||||||
@@ -857,11 +858,15 @@ Panel {
|
|||||||
// Clipped, so knocked rows fall out of the panel.
|
// Clipped, so knocked rows fall out of the panel.
|
||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
// Let circular actions straddle the rows' top-right corners.
|
||||||
|
anchors.topMargin: -Style.space(12)
|
||||||
|
anchors.rightMargin: -Style.space(12)
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: listWrap
|
id: listWrap
|
||||||
width: parent.width
|
y: Style.space(12)
|
||||||
|
width: stage.width
|
||||||
spacing: Style.spacing.panelGap
|
spacing: Style.spacing.panelGap
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
|||||||
Reference in new issue
Block a user