Bug 472497 - Minimum Height of Theme Selection Dialog Window Too Large
Summary: Minimum Height of Theme Selection Dialog Window Too Large
Status: CONFIRMED
Alias: None
Product: ghostwriter
Classification: Applications
Component: general (show other bugs)
Version: 23.04.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: megan.conkle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-22 12:38 UTC by adch99
Modified: 2023-07-26 07:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot showing theme selection dialog window (normal) (179.76 KB, image/png)
2023-07-22 12:38 UTC, adch99
Details
Screenshot showing theme selection dialog window (maximized) (154.63 KB, image/png)
2023-07-22 12:41 UTC, adch99
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adch99 2023-07-22 12:38:20 UTC
Created attachment 160445 [details]
Screenshot showing theme selection dialog window (normal)

SUMMARY
The theme selection dialog window is not resizable and too large to fit on a 14" screen with 30px of panel which is always visible. The amount of information in this window actually doesn't require the whole space. The minimum size is too large and this doesn't allow the user to see the buttons. Screenshots are attached. Note that a standard KDE layout might face even more issues since the title bar is hidden during maximize in my layout. Checking the code, I found that this is the relevant part of the code:

```
src/theme/themselectiondialog.cpp, line 101 onwards:
    // Find view sizes
    int focush = style()->pixelMetric(QStyle::PM_FocusFrameHMargin);
    int focusv = style()->pixelMetric(QStyle::PM_FocusFrameVMargin);
    int frame = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
    int scrollbar = style()->pixelMetric(QStyle::PM_SliderThickness) +
                    style()->pixelMetric(QStyle::PM_ScrollBarExtent);
    const int spacing = 10;
    const int rowCount = 3;
    const int columnCount = 3;
    QSize viewSize
    (
        ((d->iconWidth + frame + focush + (spacing * 2)) * columnCount) + scrollbar,
        (d->iconHeight + fontMetrics().height() + frame + focusv + (spacing * 2)) * rowCount
    );
...
    d->themeListWidget->setMinimumSize(viewSize);

```

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 adch99 2023-07-22 12:41:11 UTC
Created attachment 160446 [details]
Screenshot showing theme selection dialog window (maximized)

The minimum size calculation should probably be reworked in order to be fine on a normal screen. Kindly take a look at it again. Thanks for your work and effort in maintaining ghostwriter!