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

Which QML file do I need to edit to add lne spacing above/below left hand side menu catagories? #139

Open
n944la opened this issue Oct 10, 2022 · 3 comments

Comments

@n944la
Copy link

n944la commented Oct 10, 2022

Hi

I would like to add a line space before & after each main menu category on the left side column. Which QML file can I edit to add spacing for these??

e.g. from this:

Python 3.10
QT Creator
Kate
INTERNET APPS
Firefox
Filezilla

to

Python 3.10
QT Creator
Kate

INTERNET APPS

Firefox
Filezilla

Note the spacing before/after INTERNET APPS

Thank you

Tim
ARS N9NU

@Zren
Copy link
Owner

Zren commented Oct 10, 2022

Ah the section headers.

In the MouseArea's implicitHeight: listView.iconSize, try adding + PlasmaCore.Units.largeSpacing * 2. The Text/Label is already vertically centered.

https://develop.kde.org/docs/extend/plasma/widget/testing/

@n944la
Copy link
Author

n944la commented Oct 10, 2022

Hi

Tnx much for responding. I added the following below as you suggested. It didn't seem to do anything however I did not log out and back in again - perhaps the issue - Also...I didn't see any reference to see adding that to the one file ....perhaps u posted that just FYI type deal.

Tim

MouseArea {
id: sectionDelegate

width: ListView.view.width
// height: childrenRect.height
implicitHeight: listView.iconSize

// Adjust line spacing before/after category entries                          <----------------  added note
PlasmaCore.Units.largeSpacing * 2                                                 <---------------- added command

property bool enableJumpToSection: false

@Zren
Copy link
Owner

Zren commented Oct 11, 2022

I meant:

// implicitHeight: listView.iconSize
implicitHeight: listView.iconSize + PlasmaCore.Units.largeSpacing * 2
// implicitHeight: listView.iconSize + PlasmaCore.Units.smallSpacing * 2
// implicitHeight: listView.iconSize + 10 * PlasmaCore.Units.devicePixelRatio * 2

devicePixelRatio will scale 10 by the screen's DPI. We want padding above and below so we multiply our number by 2. largeSpacing and smallSpacing are preset values used in Plasma and already scaled by DPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants