Skip to content

[pull] master from Zren:master#16

Open
pull[bot] wants to merge 207 commits intoRogueScholar:masterfrom
Zren:master
Open

[pull] master from Zren:master#16
pull[bot] wants to merge 207 commits intoRogueScholar:masterfrom
Zren:master

Conversation

@pull
Copy link

@pull pull bot commented Apr 20, 2021

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Zren added 30 commits April 19, 2021 18:16
Moved preview on top of TextField.
Preview is now a circle.
Preview now shows the hand pointing cursor on hover.
Preview outline uses a lerp between the color and textColor.
Document Kirigami.ColorUtil's lerp function (we can't use it yet).
Uses a Loader to dynamically create/destroy the ColorDialog.
Uses monospace font.
Uses FontMetric to set implicitWidth to fit #AARRGGBB.
Uses ConfigComboBox v6 as a base.

Since we depend on min Qt 5.12, we can't use ComboBox.currentValue
added in Qt 5.14. We also can't define those properties since users
might upgrade to 5.14.

For simplicity's sake, we alias value => _currentValue til we depend
on Qt 5.15 or Qt6.
Since QQC2.SpinBox is terrible compared to QQC1, we need reimplement
many features like real values with decimals and prefix/suffix.

Since QQC2 uses an integer for the value property, that limits the
size of a real number to the range of a signed int. A real with 2
decimals will reset to 0 when trying to enter a number above 11mil.

I first placed the prefix/suffix in the SpinBox text, however
filtering it out was an issue. I ended up drawing them in separate
Labels which gives us the ability to color their text.

To make room for the prefix/suffix Labels, we bind the TextInput's
leftPadding/rightPadding instead of the SpinBox's so that clicking on
the prefix/suffix will focus the TextInput.

Since the KDE Desktop QQC2 theme formats the text after each keypress
it would move the cursor to the end of the string after replacing the
TextInput text. Typing '44' with decimals=2 would turn into '4.004'.
To fix this, we scan the SpinBox for a Connections and destroy it.
We then bind to TextInput.onTextEdited ourself and keep track of where
the cursor and period is. After the TextInput text is replaced, we
move the cursor to the correct position.

When focused, we select all like QQC1 does.
Fix a few issues when typing '-'. When the text was just '-' or it
contained '-.' the valueFromText() function would contain a NaN value.
The SpinBox value would then equal the min value (which was MININT
when I was testing). When an NaN is detected, the value returns to 0.
This makes it harder to type '-5' as you first need to type '5' then
add the '-' in front. If you type '-', valueFromText() == 0 then
textFromValue() replaces the text with '0', which deletes the '-' you
just typed.

We also move the minus sign to the start of the text.

I added back the debug logging commented out since I expect more
issues to appear.
The real values are simply scaled by factor in the from/to properties.
We wrap the IconDialog in a Loader.
We place the FrameSvg in the Button.contentItem instead.
Bind SvgItem.active to Button.hovered.
IconDialog is now treated as a ModalWindow.
We automatically set Kirigami.FormData.buddyFor to the first button so
that the Kirigami label is lined up correctly.

We also create a QQC2.ButtonGroup just in case you wrap a RadioButton
in a Layout. By default in QQC2, a RadioButton will automatically
group with sibling RadioButtons in the same parent.
Be explicit about what we import from ui folder.
Update LibConfig.ColorField to v6 (just renames the id).
Use PlasmaCore.Units singleton.
Ensure group outline thickness is always at least 1px.
Remove unused imports.
We depend on Qt 5.2 for Drag.dragType
Use PlasmaCore.Units singleton.
Remove unused imports.
Also cleanup imports.
Use PlasmaCore.Units singleton.
Also remove onDestruction workaround code.
Zren added 30 commits March 14, 2024 05:11
Kirigami.Theme.buttonTextColor doesn't seem to exist
since Kirigami.Theme.buttonBackgroundColor doesn't exist
Also keep KickerListModel roles in sync with KickerAppModel.
Since we don't need to worry about Plasma Style SVG icons anymore.
Kicker (kickerdash probably) still uses it,
but I don't know why we added it.
It only contained the StandardPath for picturesLocation, but now we
have access to all XDG dirpaths in Qt6.
Not sure why this happens. The only difference is that we now have a
transition instead of an instant transition.
Show icon active effect on expand for 600ms like upstream.
TODO: Figure out how to read the default apps from SystemSettings.
We now don't need the "-selected.svg" icons anymore.
Removes panel-background.svg BG from IconField.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants