Opened 3 years ago

Closed 3 years ago

#15794 closed defect (fixed)

Wrong wxFrame size calculation in wxGTK

Reported by: afalkenhahn Owned by:
Priority: normal Milestone:
Component: wxGTK Version: 3.0.0
Keywords: Cc:
Blocked By: Blocking:
Patch: no

Description

I'm using SetSizeHints() to give my TLW a fixed height. Precisely, I use it like this in my wxFrame's CTOR:

panel->SetSizer(vbox);
SetClientSize(panel->GetBestSize());
int height = GetSize().GetHeight();
SetSizeHints(-1, height, -1, height);

This works fine with 2.8.12 on MSW, GTK, Carbon and with 3.0.0 on MSW, Carbon, Cocoa. However, it doesn't work correctly on GTK with 3.0.0. I attach a screenshot to this ticket where you can see what it looks like with 2.8.12 on GTK and 3.0.0 on GTK. You can see that the control buttons are cut off in 3.0.0.

I tried to use SetMinClientSize() and SetMaxClientSize() as a workaround but this doesn't work either. The window size is always calculated too small.

Attachments (2)

test6.cpp download (2.8 KB) - added by afalkenhahn 3 years ago.
Little demo program
wx301.png download (42.7 KB) - added by afalkenhahn 3 years ago.
Screenshot that shows the differences

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by afalkenhahn

Little demo program

Changed 3 years ago by afalkenhahn

Screenshot that shows the differences

comment:1 Changed 3 years ago by vadz

It is probably WM-dependent as I don't see the bug here. Which WM/DE do you use?

comment:2 Changed 3 years ago by afalkenhahn

It happens on LinuxMint 13 KDE.

comment:3 Changed 3 years ago by pcor

  • Resolution set to fixed
  • Status changed from new to closed

fixed in r76221

Note: See TracTickets for help on using tickets.