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:
parent
e5759e43d2
commit
483a4f0d4d
|
|
@ -139,9 +139,9 @@ Column {
|
|||
// Copy block content
|
||||
ToolButton {
|
||||
text: "📋"
|
||||
font.pixelSize: 12
|
||||
implicitWidth: 24
|
||||
implicitHeight: 22
|
||||
font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
|
||||
implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
|
||||
implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.text: "Copy"
|
||||
onClicked: {
|
||||
|
|
@ -153,9 +153,9 @@ Column {
|
|||
// Retry (assistant blocks only)
|
||||
ToolButton {
|
||||
text: "🔄"
|
||||
font.pixelSize: 12
|
||||
implicitWidth: 24
|
||||
implicitHeight: 22
|
||||
font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
|
||||
implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
|
||||
implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
|
||||
visible: blockType === "assistant" || blockType === "error"
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.text: "Retry"
|
||||
|
|
@ -165,9 +165,9 @@ Column {
|
|||
// Continue (assistant blocks only)
|
||||
ToolButton {
|
||||
text: "➡️"
|
||||
font.pixelSize: 12
|
||||
implicitWidth: 24
|
||||
implicitHeight: 22
|
||||
font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
|
||||
implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
|
||||
implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
|
||||
visible: blockType === "assistant"
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.text: "Continue"
|
||||
|
|
@ -177,9 +177,9 @@ Column {
|
|||
// Edit & Resend (user blocks only)
|
||||
ToolButton {
|
||||
text: "✏️"
|
||||
font.pixelSize: 12
|
||||
implicitWidth: 24
|
||||
implicitHeight: 22
|
||||
font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
|
||||
implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
|
||||
implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
|
||||
visible: blockType === "user"
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.text: "Copy to input for editing"
|
||||
|
|
@ -193,9 +193,9 @@ Column {
|
|||
// Bookmark
|
||||
ToolButton {
|
||||
text: root.isBookmarked ? "🔖" : "📌"
|
||||
font.pixelSize: 12
|
||||
implicitWidth: 24
|
||||
implicitHeight: 22
|
||||
font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
|
||||
implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
|
||||
implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.text: root.isBookmarked ? "Remove bookmark" : "Bookmark"
|
||||
onClicked: {
|
||||
|
|
|
|||
|
|
@ -419,15 +419,15 @@ Item {
|
|||
|
||||
delegate: ItemDelegate {
|
||||
width: bookmarksList.width
|
||||
height: 36
|
||||
height: theme.fontSize > 0 ? theme.fontSize * 3 : 36
|
||||
|
||||
property string ollieUrl: "ollie://" + encodeURIComponent(sessionName) + "/" + encodeURIComponent(agentName) + "#" + blockIndex
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: 8
|
||||
anchors.rightMargin: 4
|
||||
spacing: 4
|
||||
anchors.leftMargin: theme.fontSize > 0 ? theme.fontSize * 0.6 : 8
|
||||
anchors.rightMargin: theme.fontSize > 0 ? theme.fontSize * 0.3 : 4
|
||||
spacing: theme.fontSize > 0 ? theme.fontSize * 0.3 : 4
|
||||
|
||||
Column {
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -450,8 +450,9 @@ Item {
|
|||
|
||||
ToolButton {
|
||||
text: "📋"
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
|
||||
implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
|
||||
implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
|
||||
onClicked: clipboard.setText(ollieUrl)
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.delay: 500
|
||||
|
|
@ -460,9 +461,13 @@ Item {
|
|||
|
||||
ToolButton {
|
||||
text: "✕"
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.9 : 11
|
||||
implicitWidth: theme.fontSize > 0 ? theme.fontSize * 2 : 28
|
||||
implicitHeight: theme.fontSize > 0 ? theme.fontSize * 1.8 : 24
|
||||
onClicked: root.removeBookmark(sessionId, agentId, blockIndex)
|
||||
ToolTip.visible: hovered
|
||||
ToolTip.delay: 500
|
||||
ToolTip.text: "Remove bookmark"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue