gui: use font-relative sizing for bookmark buttons

- All ToolButtons now use theme.fontSize-based sizing
- Height, width, margins, and spacing scale with font
- Removed all hardcoded pixel values from bookmark UI
This commit is contained in:
Levi Neely 2026-10-09 14:10:14 +02:00
parent e5759e43d2
commit 483a4f0d4d
2 changed files with 28 additions and 23 deletions

View File

@ -139,9 +139,9 @@ Column {
// Copy block content // Copy block content
ToolButton { ToolButton {
text: "📋" text: "📋"
font.pixelSize: 12 font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
implicitWidth: 24 implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
implicitHeight: 22 implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
ToolTip.visible: hovered ToolTip.visible: hovered
ToolTip.text: "Copy" ToolTip.text: "Copy"
onClicked: { onClicked: {
@ -153,9 +153,9 @@ Column {
// Retry (assistant blocks only) // Retry (assistant blocks only)
ToolButton { ToolButton {
text: "🔄" text: "🔄"
font.pixelSize: 12 font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
implicitWidth: 24 implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
implicitHeight: 22 implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
visible: blockType === "assistant" || blockType === "error" visible: blockType === "assistant" || blockType === "error"
ToolTip.visible: hovered ToolTip.visible: hovered
ToolTip.text: "Retry" ToolTip.text: "Retry"
@ -165,9 +165,9 @@ Column {
// Continue (assistant blocks only) // Continue (assistant blocks only)
ToolButton { ToolButton {
text: "➡️" text: "➡️"
font.pixelSize: 12 font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
implicitWidth: 24 implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
implicitHeight: 22 implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
visible: blockType === "assistant" visible: blockType === "assistant"
ToolTip.visible: hovered ToolTip.visible: hovered
ToolTip.text: "Continue" ToolTip.text: "Continue"
@ -177,9 +177,9 @@ Column {
// Edit & Resend (user blocks only) // Edit & Resend (user blocks only)
ToolButton { ToolButton {
text: "✏️" text: "✏️"
font.pixelSize: 12 font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
implicitWidth: 24 implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
implicitHeight: 22 implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
visible: blockType === "user" visible: blockType === "user"
ToolTip.visible: hovered ToolTip.visible: hovered
ToolTip.text: "Copy to input for editing" ToolTip.text: "Copy to input for editing"
@ -193,9 +193,9 @@ Column {
// Bookmark // Bookmark
ToolButton { ToolButton {
text: root.isBookmarked ? "🔖" : "📌" text: root.isBookmarked ? "🔖" : "📌"
font.pixelSize: 12 font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
implicitWidth: 24 implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
implicitHeight: 22 implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
ToolTip.visible: hovered ToolTip.visible: hovered
ToolTip.text: root.isBookmarked ? "Remove bookmark" : "Bookmark" ToolTip.text: root.isBookmarked ? "Remove bookmark" : "Bookmark"
onClicked: { onClicked: {

View File

@ -419,15 +419,15 @@ Item {
delegate: ItemDelegate { delegate: ItemDelegate {
width: bookmarksList.width width: bookmarksList.width
height: 36 height: theme.fontSize > 0 ? theme.fontSize * 3 : 36
property string ollieUrl: "ollie://" + encodeURIComponent(sessionName) + "/" + encodeURIComponent(agentName) + "#" + blockIndex property string ollieUrl: "ollie://" + encodeURIComponent(sessionName) + "/" + encodeURIComponent(agentName) + "#" + blockIndex
RowLayout { RowLayout {
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: 8 anchors.leftMargin: theme.fontSize > 0 ? theme.fontSize * 0.6 : 8
anchors.rightMargin: 4 anchors.rightMargin: theme.fontSize > 0 ? theme.fontSize * 0.3 : 4
spacing: 4 spacing: theme.fontSize > 0 ? theme.fontSize * 0.3 : 4
Column { Column {
Layout.fillWidth: true Layout.fillWidth: true
@ -450,8 +450,9 @@ Item {
ToolButton { ToolButton {
text: "📋" text: "📋"
implicitWidth: 20 font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
implicitHeight: 20 implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
onClicked: clipboard.setText(ollieUrl) onClicked: clipboard.setText(ollieUrl)
ToolTip.visible: hovered ToolTip.visible: hovered
ToolTip.delay: 500 ToolTip.delay: 500
@ -460,9 +461,13 @@ Item {
ToolButton { ToolButton {
text: "✕" text: "✕"
implicitWidth: 20 font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
implicitHeight: 20 implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
onClicked: root.removeBookmark(sessionId, agentId, blockIndex) onClicked: root.removeBookmark(sessionId, agentId, blockIndex)
ToolTip.visible: hovered
ToolTip.delay: 500
ToolTip.text: "Remove bookmark"
} }
} }