wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.23k stars 510 forks source link

Frame name is duplicated in frame title bar and pane for macOS #347

Closed BrendanSimon closed 7 years ago

BrendanSimon commented 7 years ago

The name of the frame is in the title bar of the frame and also in the top part of the main pane. This occurs on macOS but not on Windows (see attached screenshots from the demo).

wxdemo_frame_macos

wxdemo_frame_win7

RobinD42 commented 7 years ago

I'm not able to duplicate this. Anything unusual about your system, python, or your copy of wxPython?

BrendanSimon commented 7 years ago

I hope not. Python 3.6, wxPython 4.0.0a1, macOS Sierra 10.12.4.

The only thing is wxPython 4.0.0a1, and the demo is from master, expecting v4.0.0a2.

DietmarSchwertberger commented 7 years ago

Working fine for me with Python 3.6.1 and wxPython 4.0.0.a1 on a Mac OS VM.

BrendanSimon commented 7 years ago

Maybe it is something with my installtion, but I can't figure out what it could be.

if wx-config --version reports 2.9.4, does that mean there is some hang over for older classic builds/installs that could be interfering?

My path looks ok and there aren't any obvious environment variables set.

$ echo $PATH
/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/MacGPG2/bin:/Applications/Wireshark.app/Contents/MacOS

Guess I'll try an uninstall and reinstall of everything.

RobinD42 commented 7 years ago

The wx-config result likely just means that you have an old installation of wxWidgets on the system, perhaps from a wxPython classic install. For Phoenix (4.0+), if you installed via the wheel files, wxWidgets libs are embedded in the package folder instead of being more publicly visible. So there should be no cross-talk between a current wxPython and an older wxWidgets.

BrendanSimon commented 7 years ago

Definitely an issue with my setup. I logged in as another user and the exact same code works fine. It must be something with my environment but I haven't worked it out yet.

I've set PATH to the basic bin directories and still the same. I even tried clearing PATH and invoking python with absolute path, but still the same result.

Environment looks ok too.

Currently stumped :-/

ZanderBrown commented 7 years ago

OSX now has native support for tabs, looking at that i expect it's the tab bar with only one tab showing Some info

BrendanSimon commented 7 years ago

Not a tab. It definitely is the frame. It happens in the wxpython demo app too.

wxglade_duplicate_frame_info wxdemo_duplicate_frame_info
ZanderBrown commented 7 years ago

Defiently looks like the OSX tab bar (not had much experience with it though)

RobinD42 commented 7 years ago

Is there a preference or keyboard shortcut somewhere that turns on a forced tab mode by default?

ZanderBrown commented 7 years ago

https://github.com/atom/atom/issues/12690#issuecomment-246930784

BrendanSimon commented 7 years ago

Yep. It was the macOS tab bar. Everything says Preferences=>Dock to select tab options, but the limited options didn't do anything.

However I did notice in wxglade in the View menu that there was an option Show Tab Bar <shift-apple-T>. This was greyed out but pressing did work. i.e. the preview window in wxglade toggled the tab bar.

What's "interesting" is that when toggled off, I can now run my app, and the wxdemo app and the tab bar is no longer present. So I guess it is a global user setting.

Thanks all :)

RobinD42 commented 7 years ago

I guess the good news about all this is that this shows that wxMac is using the correct type of native window to get this new system feature applied to it. 😃

DietmarSchwertberger commented 7 years ago

Even more than that: it seems that this menu item is not from wxGlade, but automatically inserted by Mac OS into the menu if it finds a menu named "View". If you rename it, the additional item is gone...

RobinD42 commented 7 years ago

Yep, wxMac will also merge system items into the Window menu if it exists.

ZanderBrown commented 7 years ago

@BrendanSimon so i wasn't compleatly off then 😄

BrendanSimon commented 7 years ago

@ZanderBrown : yes you were not completely off :) I misunderstood your pointer to "tabs". I thought you were referring to wx.Notebook tabs, rather than the new fangdangle macOS tabs :)

Thanks heaps !!

itsayellow commented 5 years ago

Is there a way to have the View menu on the Mac without the Mac system-added menu items (such as "Show Tab Bar")?

My apologies if it's bad etiquette to comment on a closed item, but this was the only help I could find for this.