Skip to content
This repository was archived by the owner on Nov 22, 2026. It is now read-only.
Draft
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
2 changes: 1 addition & 1 deletion ui/App.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ Item {
objectName: "app-title-bar"
readonly property bool searchVisible: !root.showPage && !root.composing
readonly property bool searchStacked: searchVisible
&& width - headerLeft.width - headerRight.width - MailStyle.space(52) < MailStyle.space(220)
&& width - headerLeft.width - headerRight.width - MailStyle.space(52) < MailStyle.space(105)
readonly property real topRowHeight: Math.max(MailStyle.space(48),headerLeft.height + MailStyle.space(12),headerRight.height + MailStyle.space(12))
anchors.top: parent.top
anchors.left: parent.left
Expand Down
8 changes: 4 additions & 4 deletions ui/tests/qml/imports/qs/Commons/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ QtObject {
readonly property int focusBorderWidth: 1
readonly property color normalBorderColor: normalBorderFor(Commons.Color.foreground, Commons.Color.accent)
readonly property var font: ({
family: "monospace", iconFamily: "monospace", title: 22, heading: 18, body: 14, bodySmall: 13, caption: 11,
icon: 16, iconSmall: 14, iconLarge: 18
family: "monospace", iconFamily: "monospace", title: 22, heading: 18, body: 12, bodySmall: 11, caption: 10,
icon: 14, iconSmall: 11, iconLarge: 18
})
// Invariant: popup rows need the shell's nonzero height so pointer events
// reach the menu instead of the controls underneath it.
readonly property var spacing: ({
controlPaddingX: 8, controlPaddingY: 5, inputPaddingY: 5, tooltipPaddingX:8, tooltipPaddingY:5, huge:24, labelGap:6, dropdownWidth:240, lg:8, numberFieldWidth:96,
controlHeight: 30, controlGap: 6, sm: 3, md: 6, popupRowHeight: 28
controlPaddingX: 10, controlPaddingY: 6, inputPaddingY: 7, tooltipPaddingX:8, tooltipPaddingY:5, huge:24, labelGap:4, dropdownWidth:240, lg:8, numberFieldWidth:120,
controlHeight: 28, controlGap: 8, sm: 3, md: 6, popupRowHeight: 28
})

// Invariant: match the shell's rounded scaling. At scale 7/6, space(4) is 5
Expand Down
2 changes: 1 addition & 1 deletion ui/tests/qml/tst_agent_interaction.qml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Item {
verify(waitForRendering(popup))
var field = findChild(popup, "agent-prompt-field")
compare(findChild(popup, "agent-ask-button"), null)
verify(field.width > popup.width - 40)
compare(field.width, popup.width - 2 * MailStyle.space(12))
var bottom = popup.height - field.mapToItem(popup, 0, field.height).y
verify(bottom >= MailStyle.space(10) && bottom <= MailStyle.space(14), "bottom gap " + bottom)
compare(findChild(popup, "agent-more-button"), null)
Expand Down
53 changes: 53 additions & 0 deletions ui/tests/qml/tst_app_navigation.qml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Item {
property bool sidebarCollapsed: false
property bool alwaysShowImages: false
property bool unifiedCalendarView: false
property bool unified: false
property bool selectedReaderEmpty: false
property bool selectedReaderTooHeavy: false
property bool selectedTooHeavy: false
Expand Down Expand Up @@ -288,6 +289,7 @@ Item {
mailService.lastSavedDraft = null
mailService.refuseMove = false
mailService.accountCount = 1
mailService.unified = false
mailService.providerId = "gmail"
mailService.hasSavedAccounts = true
mailService.anyAccountReady = true
Expand Down Expand Up @@ -696,6 +698,57 @@ Item {
compare(mailService.count("calendar"), before + 1)
}

function test_search_stays_between_the_buttons_at_one_third_screen_width() {
var host = null
for (var index = 0; index < app.data.length; index++) {
var candidate = app.data[index]
if (candidate.title === "✉️ Magpie Mail" && candidate.minimumSize !== undefined) host = candidate
}
verify(host, "the real Magpie window is in the fixture")
var oldWidth = host.width
var oldHeight = host.height
var oldMinimumWidth = host.minimumSize.width
var oldMinimumHeight = host.minimumSize.height
try {
var header = named(app, "app-title-bar")
var search = named(app, "search-bar")
var folder = named(app, "folder-button")
var headerLeft = named(app, "header-account-button").parent
mailService.unified = true
Style.spacingScale = 2
Style.spacingScale = 1
waitForRendering(app)
host.width = 640
host.height = 800
waitForRendering(app)
compare(header.searchStacked, false, "search stays on the top row at 640 points with the unified All button")
var searchRight = search.mapToItem(header, search.width, 0).x
var folderLeft = folder.mapToItem(header, 0, 0).x
verify(searchRight <= folderLeft, "the inline field does not touch the folder button")
var searchLeft = search.mapToItem(header, 0, 0).x
var leftRight = headerLeft.mapToItem(header, headerLeft.width, 0).x
verify(searchLeft >= leftRight, "the inline field does not touch the left controls")
host.minimumSize = Qt.size(240, 480)
host.width = 300
waitForRendering(app)
compare(host.width, 300, "the fixture resized the real window")
verify(header.width > 0 && header.width <= 300, "the header follows the real window")
compare(header.searchStacked, true, "search moves below only when the controls leave too little room")
} finally {
host.minimumSize = Qt.binding(function() { return Qt.size(Style.space(640), Style.space(480)) })
Style.spacingScale = 2
compare(host.minimumSize.width, oldMinimumWidth * 2, "the minimum-width binding follows the shell scale")
compare(host.minimumSize.height, oldMinimumHeight * 2, "the minimum-height binding follows the shell scale")
Style.spacingScale = 1
compare(host.minimumSize.width, oldMinimumWidth, "the original minimum width is restored")
compare(host.minimumSize.height, oldMinimumHeight, "the original minimum height is restored")
host.width = oldWidth
host.height = oldHeight
mailService.unified = false
waitForRendering(app)
}
}

function test_calendar_handoff_keeps_the_mail_header() {
var compose = named(app, "compose-button")
verify(compose && compose.visible)
Expand Down
1 change: 1 addition & 0 deletions ui/tests/qml/tst_inbox_bundles.qml
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ Item {
}

function test_the_offer_can_be_refused_however_narrow_the_row() {
narrowRow.width = 400
narrowRow.summary = ({id:"front",from:{display:"A"},time:"09:14",bundleProposal:true,bundleQuestion:"Bundle these?"})
waitForRendering(narrowRow)
var buttons = findChild(narrowRow, "bundle-buttons")
Expand Down
1 change: 1 addition & 0 deletions ui/tests/qml/tst_picker_keyboard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ Rectangle {
keyClick(Qt.Key_Tab)
keyClick(Qt.Key_Tab)
var ccButton = focused()
compare(ccButton.text, "+ Cc")
mouseClick(ccButton, ccButton.width / 2, ccButton.height / 2)
compare(host.selected, [host.contact, "cc"])
compare(host.contactSelections, 1)
Expand Down
Loading