QML Spinner doesn't work with MuseScore custom UI style
See http://musescore.org/en/node/25603
when loading the plugin in 2.0, it looks like this and doesn't change on click:
It breaks the page as expected though (by default 4 bars, hardcoded), and one can in/decrease the amount of bars with shift + up/down as well as typing blindly some number into the dialog. There is no visible indication.
There is another, possibly related issue though (in 2.0):
1.: Select a part of your score
2.: Open the "Break every X number of measures" plugin and press enter
3.: Select the same part again and reopen the plugin
4.: Now de/increase X and press enter
For the OP, this results in the generic key signatures(bflat, eflat, aflat in that case) being shown every 4 bars, where a linebreak used to be.
OP is using MuseScore guthub-MuseScore-musecore-3543170 on Ubuntu 14.04.
I can reproduce this on Windows 7
That input field is supposed to be a SpinBox, but doesn't look like one, it is lacking the up-/down arrows to in-/decrease the value.
Attachment | Size |
---|---|
BreakX.png | 9.89 KB |
Comments
Yet the spinbox reacts to keyboard input!
Both entering a number and SHIFT+arrow up/down have effect for me.
On http://musescore.org/en/node/27421 is another user having the problem, on Mac, e9e0e34
This is a style. If commenting out this part of the code https://github.com/musescore/MuseScore/blob/72a2f3e0c141dd527b7e9649ea4… to disable the styling and so use native style, the SpinBox is looking good.
A very cheap but rather inelegant way to work-around this problem could be to redefine the style for the spinbox inside the break plugin. Such as adding to break.qml:
{syntaxhighlighter brush:c++}import QtQuick.Controls.Styles 1.2{/syntaxhighlighter}
and inside the
SpinBox
definition:{syntaxhighlighter brush:c++} style: SpinBoxStyle{
background: Rectangle {
implicitWidth: 100
implicitHeight: 20
border.color: "gray"
radius: 2
}
}{/syntaxhighlighter}
(this style was directly taken from the Qt example page; it's just an example). In this way the style for this spinbox is overwritten and it works again.
Of course, this workaround does not solve a possible underlying bug in the style which may be the cause of this plugin bug.
FWIW, there is a number of known bug in the Oxygen theme related to Qt Quick...
See https://community.kde.org/Plasma/OxygenQmlControls A good summary in the end "In Oxygen most style methods take an optional parameter which is the widget to get hints for. From QtQuickControls this is a null pointer. Oxygen sometimes fails on this and returns different to the desktop implementation."
I believe that has already been fixed, but if not is certainly remedied by PR #1246, although still not perfect.
Fixed in 8fccbd11a7
Still doesn't look good, not even close to what lasconic showed further up, see
2e61d6b, Windows 7
I agree it's still not great Jojo, but it will never look like lasconic's picture above for you, atl least not until you run MS on a Mac.
Sure, I know that, but it should look like the spinners in e.g. Inspector or any of the other dialogs inside MuseScore, i.e. with a clear distinction between the up- and down pointer