Skip to content
Open
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
3 changes: 3 additions & 0 deletions GlobalStates.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Singleton {
// Deferred panel loading gate — non-critical panels wait for this before activating
property bool deferredPanelsReady: false
// Boot greeting lifecycle — singleton preserves across hot-reload so greeting shows once per session
property bool videoEditorPopupOpen: false
property bool videoEditorOpen: false
property string videoEditorPath: ""
property bool bootGreetingOpen: false
property bool bootGreetingDone: false
property bool barOpen: true
Expand Down
19 changes: 14 additions & 5 deletions modules/background/widgets/clock/CookieQuote.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import qs.modules.common.widgets
import QtQuick
import Qt5Compat.GraphicalEffects


Item {
id: root

Expand All @@ -30,14 +29,24 @@ Item {
Rectangle {
id: quoteBox

implicitWidth: quoteStyledText.width + 16 // for spacing on both sides
implicitHeight: quoteStyledText.height + 8
implicitWidth: quoteRow.implicitWidth + 16
implicitHeight: quoteRow.implicitHeight + 8
radius: Appearance.rounding.small
color: Appearance.colors.colSecondaryContainer

Row {
id: quoteRow
anchors.centerIn: parent
spacing: 0
spacing: 4

MaterialSymbol {
id: quoteIcon
anchors.top: parent.top
iconSize: Appearance.font.pixelSize.huge
text: "format_quote"
color: Appearance.colors.colOnSecondaryContainer
}

StyledText {
id: quoteStyledText
horizontalAlignment: Text.AlignLeft
Expand All @@ -51,4 +60,4 @@ Item {
}
}
}
}
}
115 changes: 115 additions & 0 deletions modules/regionSelector/CursorGuide.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import qs.services
import qs.modules.common
import qs.modules.common.widgets
import QtQuick

Item {
id: root
property var action
property var selectionMode

property int duration: 1000

property string description: switch (root.action) {
case RegionSelection.SnipAction.Copy:
case RegionSelection.SnipAction.Edit:
return Translation.tr("Copy region (LMB) or annotate (RMB)");
case RegionSelection.SnipAction.Search:
root.duration = 1500;
return Translation.tr("Use Google Lens (LMB) or ask AI (RMB)");
case RegionSelection.SnipAction.CharRecognition:
return Translation.tr("Recognize text");
case RegionSelection.SnipAction.Record:
case RegionSelection.SnipAction.RecordWithSound:
return Translation.tr("Record region");
}
property string materialSymbol: switch (root.action) {
case RegionSelection.SnipAction.Copy:
case RegionSelection.SnipAction.Edit:
return "content_cut";
case RegionSelection.SnipAction.Search:
return "image_search";
case RegionSelection.SnipAction.CharRecognition:
return "document_scanner";
case RegionSelection.SnipAction.Record:
case RegionSelection.SnipAction.RecordWithSound:
return "videocam";
default:
return "";
}

property bool showDescription: true
function hideDescription() {
root.showDescription = false
}
Timer {
id: descTimeout
interval: root.duration
running: true
onTriggered: {
root.hideDescription()
}
}
onActionChanged: {
root.showDescription = true
descTimeout.restart()
}

property int margins: 8
implicitWidth: content.implicitWidth + margins * 2
implicitHeight: content.implicitHeight + margins * 2

Rectangle {
id: content
anchors.centerIn: parent

property real padding: 8
implicitHeight: 38
implicitWidth: root.showDescription ? contentRow.implicitWidth + padding * 2 : implicitHeight
clip: true

topLeftRadius: 6
bottomLeftRadius: implicitHeight - topLeftRadius
bottomRightRadius: bottomLeftRadius
topRightRadius: bottomLeftRadius

color: Appearance.colors.colPrimary

Behavior on topLeftRadius {
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
}
Behavior on implicitWidth {
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
}

Row {
id: contentRow
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: content.padding
}
spacing: 12

MaterialSymbol {
anchors.verticalCenter: parent.verticalCenter
iconSize: 22
color: Appearance.colors.colOnPrimary
animateChange: true
text: root.materialSymbol
}

FadeLoader {
id: descriptionLoader
anchors.verticalCenter: parent.verticalCenter
shown: root.showDescription
sourceComponent: StyledText {
color: Appearance.colors.colOnPrimary
text: root.description
anchors.right: parent.right
anchors.rightMargin: 6
}
}
}
}
}
10 changes: 10 additions & 0 deletions modules/regionSelector/RegionSelection.qml
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,16 @@ PanelWindow {
overlayColor: root.overlayColor
points: root.points
}
}

// The thing to the bottom-right with an icon
CursorGuide {
z: 9999
visible: true
x: root.dragging ? root.regionX + root.regionWidth : mouseArea.mouseX
y: root.dragging ? root.regionY + root.regionHeight : mouseArea.mouseY
action: root.action
selectionMode: root.selectionMode
}

// Window regions
Expand Down
Loading