wxMiniFrame - close button not shown on linux

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 329
Joined: Fri Dec 09, 2016 7:28 am
Contact:

wxMiniFrame - close button not shown on linux

Post by cutecode » Thu Apr 30, 2020 9:30 pm

Why close buton not shown on linux with wxMiniFrame? Is it a bug?
But it present on Windows.

Code: Select all

	wxRect rc(300, 300, 300, 500);
	wxMyMiniFrame* m_pMyMiniFrame;

	m_pMyMiniFrame = new wxMyMiniFrame;
	m_pMyMiniFrame->Create(this, wxID_ANY, L"", wxPoint(rc.x, rc.y), wxSize(rc.GetWidth(), rc.GetHeight()), 
		wxSTAY_ON_TOP | wxRESIZE_BORDER | wxFRAME_NO_TASKBAR | wxCLOSE_BOX | wxCAPTION | wxSYSTEM_MENU);
wx 3.1.4 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4240
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMiniFrame - close button not shown on linux

Post by ONEEYEMAN » Fri May 01, 2020 4:56 am

Hi,
What platform? What GTK+ version? What WM do you use? Any non-default theme?
Also - does it show in dialogs sample?

Thank you.

User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 329
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxMiniFrame - close button not shown on linux

Post by cutecode » Fri May 01, 2020 3:58 pm

Hello

debian 9, GTK 2
no VM, real computer
I tried in on 2 computers and many theams
On some seams close button not shown in dialogs,
But in wxMiniFrame never shown close button
wx 3.1.4 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru

User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 329
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxMiniFrame - close button not shown on linux

Post by cutecode » Fri May 01, 2020 4:06 pm

WOW

I tested Dialogs sample, and close button is shown in mini frame
I'll test this sample deeply

Thank you
wx 3.1.4 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4240
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMiniFrame - close button not shown on linux

Post by ONEEYEMAN » Fri May 01, 2020 4:54 pm

Hi,
cutecode wrote:
Fri May 01, 2020 3:58 pm
Hello

debian 9, GTK 2
Why are you using an outdfated GTK+? ;-)
cutecode wrote:
Fri May 01, 2020 3:58 pm
no VM, real computer
I didn't talk about Virtual Machine - WM stands for Window Manager (Gnome, K, Xfce, etc)
cutecode wrote:
Fri May 01, 2020 3:58 pm
I tried in on 2 computers and many theams
On some seams close button not shown in dialogs,
But in wxMiniFrame never shown close button

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4240
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMiniFrame - close button not shown on linux

Post by ONEEYEMAN » Fri May 01, 2020 4:55 pm

Hi,
cutecode wrote:
Fri May 01, 2020 4:06 pm
WOW

I tested Dialogs sample, and close button is shown in mini frame
I'll test this sample deeply

Thank you
So what do you do differently?

Thank you.

User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 329
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxMiniFrame - close button not shown on linux

Post by cutecode » Fri May 01, 2020 4:56 pm

Found !!!

If no caption is given in create function, then close button is not shown

THX
wx 3.1.4 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4240
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMiniFrame - close button not shown on linux

Post by ONEEYEMAN » Fri May 01, 2020 5:01 pm

Hi,
cutecode wrote:
Fri May 01, 2020 4:56 pm
Found !!!

If no caption is given in create function, then close button is not shown

THX
Of course.
Where else do yoiu expect the button to show? ;-)

Thank you.

User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 329
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxMiniFrame - close button not shown on linux

Post by cutecode » Fri May 01, 2020 5:40 pm

I ment caption string, not caption style

Even if you make wxCLOSE_BOX | wxCAPTION style, but empty caption string, the close button is not shown
wx 3.1.4 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4240
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMiniFrame - close button not shown on linux

Post by ONEEYEMAN » Fri May 01, 2020 7:24 pm

Hi,
Weird.
What is your exact GTK+ version?
Is it the same with more modern GTK+ {3} one?

Never mind - I just took a look at the src/gtk/minifram.cpp.
It looks like the "Close" button does depend on the presence of the title.

Thank you.

User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 329
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxMiniFrame - close button not shown on linux

Post by cutecode » Fri May 01, 2020 7:50 pm

Code: Select all

dpkg -l libgtk2.0-0

ii  libgtk2.0-0:amd64               2.24.31-2              amd64                  GTK+ graphical user interface library
ii  libgtk2.0-0:i386                  2.24.31-2              i386                   GTK+ graphical user interface library
I tried gtk3 2 years ago, and moved to gtk2, coz interface looked Horrible
viewtopic.php?f=33&t=44737&p=185496&hilit=gtk3#p185496

Thank you for your help
wx 3.1.4 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4240
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxMiniFrame - close button not shown on linux

Post by ONEEYEMAN » Fri May 01, 2020 8:17 pm

Hi,
You shuold look into 3.24.
But GTK+2 is obsolete...

Thank you.

Post Reply