Skip to content

Commit

Permalink
Start changing style page
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-spa committed Dec 23, 2024
1 parent c9ffb98 commit 452d4e6
Show file tree
Hide file tree
Showing 9 changed files with 199 additions and 186 deletions.
5 changes: 5 additions & 0 deletions src/notation/notationscene.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,10 @@
<file>qml/MuseScore/NotationScene/internal/EditStyle/TextFieldWithReset.qml</file>
<file>qml/MuseScore/NotationScene/internal/EditStyle/IconAndTextButtonSelector.qml</file>
<file>qml/MuseScore/NotationScene/PercussionPanelPadSwapDialog.qml</file>
<file>qml/MuseScore/NotationScene/internal/EditStyle/timeSigImages/timesig-above_staves.png</file>
<file>qml/MuseScore/NotationScene/internal/EditStyle/timeSigImages/timesig-across_staves.png</file>
<file>qml/MuseScore/NotationScene/internal/EditStyle/timeSigImages/timesig-courtesy-hang.png</file>
<file>qml/MuseScore/NotationScene/internal/EditStyle/timeSigImages/timesig-courtesy-right_align.png</file>
<file>qml/MuseScore/NotationScene/internal/EditStyle/timeSigImages/timesig-on_all_staves.png</file>
</qresource>
</RCC>
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Muse.Ui 1.0

Rectangle {
anchors.fill: parent
color: ui.theme.backgroundPrimaryColor
color: "transparent"

TimeSigPageModel {
id: model
Expand All @@ -38,40 +38,72 @@ Rectangle {
width: parent.width
spacing: 12

StyledTextLabel {
horizontalAlignment: Text.AlignLeft
text: qsTrc("notation/editstyle/timesignatures", "Position:")
}
RowLayout {
Layout.fillHeight: true
Layout.fillWidth: true

RoundedRadioButton {
text: qsTrc("notation/editstyle/timesignatures", "On all staves")
checked: model.timeSigPlacement.value === 0
onToggled: model.timeSigPlacement.value = 0
}
ColumnLayout {
Layout.fillWidth: true
spacing: 8

RoundedRadioButton {
text: qsTrc("notation/editstyle/timesignatures", "Above staves")
checked: model.timeSigPlacement.value === 1
onToggled: model.timeSigPlacement.value = 1
}
StyledTextLabel {
Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft
text: qsTrc("notation/editstyle/timesignatures", "Position:")
}

RoundedRadioButton {
text: qsTrc("notation/editstyle/timesignatures", "Across staves")
checked: model.timeSigPlacement.value === 2
onToggled: model.timeSigPlacement.value = 2
}
RoundedRadioButton {
text: qsTrc("notation/editstyle/timesignatures", "On all staves")
checked: model.timeSigPlacement.value === 0
onToggled: model.timeSigPlacement.value = 0
}

RoundedRadioButton {
text: qsTrc("notation/editstyle/timesignatures", "Above staves")
checked: model.timeSigPlacement.value === 1
onToggled: model.timeSigPlacement.value = 1
}

FlatButton {
visible: model.timeSigPlacement.value !== 0
text: qsTrc("notation/editstyle/timesignatures", "Edit system object staves…")
//onClicked:
RoundedRadioButton {
text: qsTrc("notation/editstyle/timesignatures", "Across staves")
checked: model.timeSigPlacement.value === 2
onToggled: model.timeSigPlacement.value = 2
}

StyledTextLabel {
visible: model.timeSigPlacement.value !== 0
text: qsTrc("notation/editstyle/timesignatures", "Set where time signatures appear using the Layout panel.")
}
}

Rectangle {
Layout.preferredWidth: childrenRect.width + 16
Layout.fillHeight: true
color: "#ffffff"
border.color: ui.theme.strokeColor
radius: ui.theme.borderWidth

Image {
id: image

height: parent.height - 16
anchors.centerIn: parent
mipmap: true

fillMode: Image.PreserveAspectFit

source: model.timeSigPlacement.value === 0 ? "timeSigImages/timesig-on_all_staves.png"
: model.timeSigPlacement.value === 1 ? "timeSigImages/timesig-above_staves.png"
: "timeSigImages/timesig-across_staves.png"
}
}
}

StyledGroupBox {
Layout.fillWidth: true
Layout.fillHeight: true

title: qsTrc("notation/editstyle/timesignatures", "Style")
title: qsTrc("notation/editstyle/timesignatures", "Style and size")

ColumnLayout {
Layout.fillWidth: true
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions src/notation/view/widgets/editstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ EditStyle::EditStyle(QWidget* parent)
{ StyleId::hideTabClefAfterFirst, false, hideTabClefs, 0 },
{ StyleId::genClef, false, clefVisibility, 0 },
{ StyleId::genKeysig, false, keysigVisibility, 0 },
{ StyleId::genCourtesyTimesig, false, genCourtesyTimesig, 0 },
{ StyleId::genCourtesyKeysig, false, genCourtesyKeysig, 0 },
{ StyleId::genCourtesyClef, false, genCourtesyClef, 0 },
{ StyleId::keySigCourtesyBarlineMode, false, ksbl, 0 },
Expand Down Expand Up @@ -944,10 +943,10 @@ EditStyle::EditStyle(QWidget* parent)
// ====================================================

auto timeSigPage = createQmlWidget(
groupBoxTimeSig,
groupBox_timeSigSettings,
QUrl(QString::fromUtf8("qrc:/qml/MuseScore/NotationScene/internal/EditStyle/TimeSigPage.qml")));
timeSigPage.widget->setMinimumSize(224, 440);
groupBoxTimeSig->layout()->addWidget(timeSigPage.widget);
timeSigPage.widget->setMinimumSize(224, 650);
groupBox_timeSigSettings->layout()->addWidget(timeSigPage.widget);

// ====================================================
// Figured Bass
Expand Down
Loading

0 comments on commit 452d4e6

Please sign in to comment.