the header is a Rectangle, and the phone puts it where it is
A Controls ToolBar hands its children to a style-owned contentItem, and on the NX789J that item sat 35 px below the bar itself: the header was at y 0 h 42 while its own gear was at y 56 -- drawn on top of the sidebar's first lines, and clicked there too, so the settings dialog could not be opened from the gear at all (eleven checks that follow it failed with it). A desktop never showed it: same style (Basic), same numbers, gear at y 21. A plain Rectangle has no such indirection -- its children are where it is. Nothing else changed; the background and the border line are the same. --uitest prints what it sees at that point now (style, window, header, gear, safe area), which is how this was found: note style Basic, window 1280x853, header y 0 h 42, gear centre y 21 Before: gear centre y 56, `FAIL the gear opens the settings dialog`, 17 failures on the device. After: 95 ok, 4 FAIL (Open/Share and the two clipboard-image checks, which Android has no answer for).
This commit is contained in:
+16
-9
@@ -201,18 +201,25 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
// ---- the shell -------------------------------------------------------
|
||||
header: ToolBar {
|
||||
/* A plain Rectangle, not a ToolBar. A Controls ToolBar hands its children
|
||||
* to a style-owned contentItem, and on this phone that item sat 35 px below
|
||||
* the bar itself -- header y 0 h 42 with its gear at y 56 -- so the gear
|
||||
* was drawn, and clicked, outside the header, over the sidebar. A
|
||||
* Rectangle puts its children where it is (checked with --uitest on the
|
||||
* device and on both styles at home). */
|
||||
header: Rectangle {
|
||||
id: appBar
|
||||
objectName: "appBar"
|
||||
implicitHeight: Theme.headerHeight
|
||||
background: Rectangle {
|
||||
color: Theme.surface
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.border
|
||||
}
|
||||
color: Theme.surface
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: Theme.border
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Theme.pad
|
||||
|
||||
Reference in New Issue
Block a user