Can the space for a vertically aligned icon in KPageDialog entires be removed when no icons are present?

At the undermentioned, I reported that was extraneous unused space in KDbg’s KPageDialog entries, below their labels:

I was informed that this is a fault of KPageDialog, because their implementation is unmodified from the defaults (except for customised label values, of course).

Can anyone confirm that this is true? The relevant code sample is provided within the aforecited link. I ask because I want to ensure that this is correct before I report it to Bugzilla.

Probably by setting a FaceType from KWidgetsAddons - KPageDialog Class Reference

What you see there is List, the default picked from Auto.

You could probably use FlatList (Kate’s settings page for example), but it also requires icons I believe. Personally I feel like it makes no sense to use FlatList, you’d be making the click targets more difficult to hit and would have a lot of unused space underneath. It’s very clearly made for cases where your list of pages is huge.

Tabbed probably makes more sense in this case. Or simply adding icons to the List.

1 Like

@Herzenschein, say that there were four entries, instead of the two depicted. They would still all fit inside that window’s sidebar at its current default height, even whilst each retains their current padding. However, it would certainly be difficult to read, due to the vertical space between each label.

As an example of the alternative, I’ve seen many a QTreeView without icons, and with significantly compressed touch targets, so I’m surprised you don’t consider the current padding to be extraneous.

I didn’t say that.

I meant to say that for a list of pages with only two items it doesn’t make sense to use FlatList. For reference:

It would look similar to this (I think). Too tiny click targets and a whole lot of nothing below the list (because it’s top aligned). Even if it were to be four pages it would still be excessive, Kate gets away with this because it has 12 pages and if they added even more in the future it would already be ready for it.

I have nothing to disagree there, it’s clearly misaligned when there’s no icons.

IMO the solution would be to add icons there to make use of the vertical space (as the class and this FaceType seem designed to be used with icons, and most KDE software does this), or use a better FaceType for this case if you really don’t want icons, like Tabbed (which I think removes the sidebar and just adds tabs on top, but I haven’t checked) (also it seems only three apps use that?).

Either of these are junior jobs you could implement in KDbg yourself. :slight_smile:

You could otherwise extend KPageDialog to default to more reasonable sizes when no icon is set but keep its current size when one is set, but as you can expect it’s not something that will arrive quickly to KDbg and might not be trivial to implement.

2 Likes

@Herzenschein, I’m surprised that you consider that to be undesirable. That’s exactly the GUI that I would have expected…

I can’t imagine anyone would have trouble hitting those with a mouse, and enlarging the icons would surely make it more difficult to read each entry (because the layout would be less like a table, with icons on the left, and text to the right.