https://bugs.kde.org/show_bug.cgi?id=527218

            Bug ID: 527218
           Summary: Gwenview cannot be resized to a narrow window
    Classification: Applications
           Product: gwenview
      Version First 26.08.2
       Reported In:
          Platform: CachyOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

## DESCRIPTION

Gwenview has an unnecessarily large minimum window width when viewing images,
even in Spotlight Mode.

I often want to use Gwenview as a small floating image viewer alongside other
applications, but the window cannot be resized narrowly enough. Ideally, I
should be able to make it approximately 80–100 pixels wide while keeping the
native title bar.

I investigated this with AI assistance and managed to modify Gwenview 26.08.2
to allow a minimum width of approximately 83 pixels.

## STEPS TO REPRODUCE

1. Open an image in Gwenview.
2. Activate Spotlight Mode.
3. Try resizing the window horizontally to approximately 100 pixels wide.

## OBSERVED RESULT

The window stops shrinking at approximately 610 pixels wide, even though the
image viewer itself can function at a much smaller width.

## EXPECTED RESULT

Gwenview should allow much narrower window sizes when viewing images in
Spotlight Mode, without requiring the user to remove native window decorations.

## SOFTWARE/OS VERSIONS

Operating System: CachyOS (Arch Linux based)

KDE Plasma Version: 6.8

KDE Frameworks Version: [Enter version from `kinfo`]

Qt Version: [Enter version from `kinfo`]

Gwenview Version: 26.08.2

Display Server: Wayland

## ADDITIONAL INFORMATION

I investigated the minimum-width restrictions in Gwenview's Qt widgets.

The original measurements were:

- Main window: 610 px
- Central splitter: 610 px
- Content widget: 610 px
- SaveBar: 610 px
- QStackedWidget: 285 px
- Image page: 83 px
- Start page: 285 px

The investigation revealed two restrictions.

First, the SaveBar widget was contributing a minimum width of 610 pixels. After
hiding it, the minimum window width dropped to 285 pixels.

Second, QStackedWidget was considering the minimum size of the Start Page even
while displaying an image. I implemented a small QStackedWidget subclass that
uses the currently active page's size hints.

With both changes, Gwenview can now be resized to approximately 83 pixels wide
in Spotlight Mode, with the native title bar intact.

I have tested this successfully on my own system.

I understand that permanently hiding SaveBar might not be appropriate for
everyone. Ideally, the application would handle minimum sizes more
intelligently without disabling existing functionality.

The investigation and code modifications were performed with AI assistance,
while I carried out the builds and testing. I have a working proof-of-concept
patch available if the developers are interested.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to