Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix global N cycles control and focus releasing bugs #429

Merged
merged 1 commit into from
Jun 25, 2024
Merged
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
6 changes: 6 additions & 0 deletions src/shoopdaloop/lib/qml/AppControls.qml
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,12 @@ Item {
value: registries.state_registry.apply_n_cycles
from: -1

editable: true
valueFromText: function(text, locale) {
release_focus_notifier.notify()
return Number.fromLocaleString(locale, text);
}

onValueModified: {
if (value != registries.state_registry.apply_n_cycles) {
registries.state_registry.set_apply_n_cycles(value)
Expand Down
2 changes: 1 addition & 1 deletion src/shoopdaloop/lib/qml/DetailsPane.qml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Item {
bottom: parent.bottom
}

ScrollView {
FocusReleasingScrollView {
anchors.fill: parent
ScrollBar.vertical.policy: ScrollBar.AsNeeded
ScrollBar.horizontal.policy: ScrollBar.AsNeeded
Expand Down
15 changes: 15 additions & 0 deletions src/shoopdaloop/lib/qml/FocusReleasingScrollView.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import QtQuick 6.6
import QtQuick.Controls 6.6
import QtQuick.Controls.Material 6.6

ScrollView {
id: root

MouseArea {
x: 0
y: 0
width: Math.max(root.contentWidth, root.width)
height: Math.max(root.contentHeight, root.height)
onClicked: release_focus_notifier.notify()
}
}
4 changes: 2 additions & 2 deletions src/shoopdaloop/lib/qml/TracksWidget.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "../generate_session.js" as GenerateSession

import ShoopDaLoop.PythonLogger

ScrollView {
FocusReleasingScrollView {
ScrollBar.horizontal.policy: ScrollBar.horizontal.size < 1.0 ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AlwaysOff
ScrollBar.horizontal.height: 10
Expand Down Expand Up @@ -134,7 +134,7 @@ ScrollView {
Component.onCompleted: initialize()
function reload() { initialize() }

ScrollView {
FocusReleasingScrollView {
id: tracks_view
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.vertical.size < 1.0 ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff;
Expand Down
Loading