gemini glow fixes + positioning for window view
C++ / fmt (pull_request) Failing after 5s
C++ / build (pull_request) Failing after 9s
C++ / clang-tidy (pull_request) Failing after 11s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 28s
Rust / build (pull_request) Successful in 50s
Python / verify (pull_request) Successful in 1m38s
Rust / fmt (pull_request) Successful in 27s
Rust / clippy (pull_request) Successful in 53s

This commit is contained in:
2026-10-08 12:08:48 +02:00
parent 4c410d638c
commit d70fb61e4a
7 changed files with 102 additions and 18 deletions
@@ -541,13 +541,16 @@ Item {
bg.border.color: Colors.palette.m3outlineVariant
bg.color: Colors.tPalette.m3surfaceContainerLowest
fastGlow: Chat.busy
glow.opacity: input.activeFocus && (!Chat.busy || ChatState.isWindow)
font: Tokens.font.body.small
implicitHeight: Math.min(root.height / 5, contentHeight + topPadding + bottomPadding)
focus: true
placeholderText: qsTr("Send a message")
sendIcon.font: Tokens.font.icon.medium
sendIcon.icon: "arrow_upward"
sendIcon.icon: Chat.busy ? "stop" : "arrow_upward"
sendIcon.padding: Tokens.padding.extraSmall
sendIcon.opacity: text || Chat.busy ? 1.0 : 0.5
sendIcon.enabled: text || Chat.busy
Component.onCompleted: {
root.focusInput();
@@ -568,6 +571,11 @@ Item {
}
}
}
onSendPressed: root.send(text)
onButtonPressed: {
if (Chat.busy)
Chat.stop();
else
root.send(text);
}
}
}
@@ -8,10 +8,11 @@ TextAreaBase {
readonly property alias bg: bg
readonly property alias sendIcon: sendIcon
readonly property alias glow: glow
property bool fastGlow: false
signal sendPressed
signal buttonPressed
bottomPadding: Tokens.padding.large
leftPadding: Tokens.padding.extraLarge
@@ -39,6 +40,7 @@ TextAreaBase {
GeminiGlow {
id: glow
glowSize: 32
z: 5
opacity: root.activeFocus ? 1 : 0
visible: opacity > 0
@@ -131,7 +133,7 @@ TextAreaBase {
}
}
onClicked: root.sendPressed()
onClicked: root.buttonPressed()
}
TapHandler {
@@ -34,8 +34,12 @@ Item {
});
const attach = () => {
incubator.object.anchors.fill = container;
incubator.object.anchors.top = container.top;
incubator.object.anchors.bottom = container.bottom;
incubator.object.anchors.margins = Tokens.padding.medium;
incubator.object.anchors.horizontalCenter = container.horizontalCenter;
incubator.object.requestClose.connect(root.requestClose);
incubator.object.implicitWidth = Qt.binding(() => Math.max(Math.min(container.width - Tokens.padding.medium * 2, 800), Config.sidebar.sizes.width));
currentItem = incubator.object;
root.loading = false;
if (!noAnim)
@@ -126,9 +126,8 @@ Item {
z: 0
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.margins: Tokens.padding.medium
anchors.right: parent.right
implicitWidth: root.width - leftMargin - sidebar.anchors.margins - Tokens.spacing.medium * 2 - anchors.margins * 2
implicitWidth: root.width - leftMargin - sidebar.anchors.margins - Tokens.spacing.medium * 2
states: State {
name: "wide"
@@ -151,10 +150,7 @@ Item {
ChatHost {
id: convHost
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
implicitWidth: Math.max(Math.min(parent.width, 800), Config.sidebar.sizes.width)
anchors.fill: parent
clip: true
onLoadingChanged: if (!loading)
+57 -3
View File
@@ -1,6 +1,7 @@
pragma ComponentBehavior: Bound
import ZShell.Config
import ZShell.Llm
import QtQuick
import QtQuick.Layouts
import qs.Components
@@ -35,10 +36,10 @@ Item {
visible: height > 0
}
CustomClippingRect {
Item {
Layout.fillHeight: true
Layout.fillWidth: true
radius: Tokens.rounding.small
clip: true
Item {
id: pages
@@ -58,6 +59,7 @@ Item {
}
CustomRect {
id: bg
anchors.fill: parent
color: Colors.tPalette.m3surfaceContainerLow
radius: Tokens.rounding.small
@@ -96,11 +98,63 @@ Item {
CustomRect {
anchors.fill: parent
color: Colors.tPalette.m3surfaceContainerLow
radius: Tokens.rounding.small
radius: Tokens.rounding.large
ChatPanel {
anchors.fill: parent
}
GeminiGlow {
innerGlow: 50
z: 5
opacity: Chat.busy ? 1.0 : 0.0
glowSize: 0
visible: opacity > 0 && !ChatState.isWindow
layer.enabled: true
layer.effect: OpacityMask {
maskSource: fadeMask
}
Behavior on opacity {
Anim {
type: Anim.DefaultEffects
}
}
}
Rectangle {
id: fadeMask
readonly property real fadeStartPos: {
const h = Math.max(1, height);
const nh = (h - h / 3) / h;
return nh;
}
anchors.fill: parent
layer.enabled: true
visible: false
gradient: Gradient {
orientation: Gradient.Vertical
GradientStop {
color: Qt.rgba(0, 0, 0, 0)
position: 0
}
GradientStop {
color: Qt.rgba(0, 0, 0, 0)
position: fadeMask.fadeStartPos
}
GradientStop {
color: Qt.rgba(0, 0, 0, 1.0)
position: 1.0
}
}
}
}
}
}