You are not logged in.
Hi all!
I hacked gtk2 to use mac-style menubars, the pkgbuild is here => http://aur.archlinux.org/packages.php?d … =1&ID=6447
Cheers!
PS: my modifed GT4_white theme => http://aquila.deus.googlepages.com/GT4_white-aqd.tar.gz
------------------------------------------------------------------
Java/Swing mac menubar
Similar to the GTK one, but the quality is not very good due to Swing's limitations.
INSTALL:
0.Need Java 1.5.0_07 (for other versions, use the patch)
1.Download my patched JRootPane.java
2.Create a dir some_dir/javax/swing and move JRootPane.java to there.
3.Chdir to some_dir (NOT javax/swing)
4.Run javac javax/swing/JRootPane.java
5.Swich to root and make a backup of /opt/java/jre/lib/rt.jar
6.Run zip -ur /opt/java/jre/lib/rt.jar javax -x "*.java"
7.Run java -Xshare:dump to re-generate shared cache.
8.Use MToolkit for AWT. Since compiz doesn't work with the new (and default) XToolkit in java 1.5, there is no need to support it. export AWT_TOOLKIT=MToolkit Limitation removed, but still require X (can't work on windows)
The patch: http://aquila.deus.googlepages.com/JRootPane.patch
Problems:
- Some menubar parts (not menu) may be not repainted well
- Mouse movement on menubar can't activate other menus, you have to click or use the old x-window/mac style (press button until you select the target item)
- When you move mouse pointer to menus, it's treated as the mouse has left menubar. No way to solve this, swing sucks...
- You can always move/resize the menubar by Alt+mouse buttons.....
Offline
OMG. Is this possible to make into an applet, so we can get some OSX-alike goodness?
BTW, this is frickin' sweet. Nice work!
Ah, I can try if you tell me what functions can the "applet" ("widget"?) provide more than that menubar?
Offline
OMG. Is this possible to make into an applet, so we can get some OSX-alike goodness?
BTW, this is frickin' sweet. Nice work!
Impossible. You need to grab the menubar widget from all GTK apps, which are not accessible. What the patch basically does is grab the menubar from an application and display it on top of the rootwindow in a certain style instead of drawing it as top level widget in the window of the application.
Offline
zencoder wrote:OMG. Is this possible to make into an applet, so we can get some OSX-alike goodness?
BTW, this is frickin' sweet. Nice work!
Impossible. You need to grab the menubar widget from all GTK apps, which are not accessible. What the patch basically does is grab the menubar from an application and display it on top of the rootwindow in a certain style instead of drawing it as top level widget in the window of the application.
But it could be emulated? Use shared memory/file to store the common info and let every gtk windows to follow it?
Offline
First, I must say Kudos, that's an awesome idea. How hard was the hack? Its not a very long diff, I'm impressed as hell.
Second, Jan is semi-wrong about GTK apps not being accessible. You have to turn it on:
export GTK_MODULES="gail:atk-bridge"
Then run your gtk apps. You should get a "GTK Accessibility Module Initialized" message as the app starts up. You can then use the AT-SPI Accessibility API to access the program (although most application devs don't care about accessibility and often inadvertantly interfere with it, especially for custom controls. GIMP and Firefox both SUCK for it). This thing is pretty much undocumented, but you can find some examples at koders.com and some docs here:
http://developer.gnome.org/doc/API/2.0/at-spi/
Some apps (noteably firefox) don't play nice with accessibility, but most are pretty good. I was able to grab the acroread menu and put it in a single button (my goal was to save space and to see if it was possible) using Python, for example.
People interested in this might also be interested in UIFacades, which are implemented in Metisse CVS:
http://insitu.lri.fr/metisse/
http://www.cse.yorku.ca/~wolfgang/papers/uifacades.pdf
It allows widgets from different applications to be cut and pasted together, and through use of simple python scripts that use the AT-SPI API as discussed above, it is possible to replace existing widgets in an application with 'replacement' widgets that might be easier or more intuitive to use. The cool thing is that we did this without having to hack the windowing toolkit, although, Metisse does hack the hell out of the X-server. I suspect that with the composite X extensions and improvements to accessibility, this work will become much easier to implement in any WM in the future. I think the scripts are distributed with Metisse CVS, but if not, I'd be happy to supply them to anyone interested.
Dusty
Offline
Hi all!
I hacked gtk2 to use mac-style menubars, the pkgbuild is here => http://aur.archlinux.org/packages.php?d … =1&ID=6447
Cheers!
PS: my modifed GT4_white theme => http://aquila.deus.googlepages.com/GT4_white-aqd.tar.gz
What font are you using in windows titles?
Offline
Nice work!
Can i find something like this to Xfce?
Damn, it's so freakin' nice!
// Kris
"Penquins, Penquins, über alles!"
Offline
hmm, one question that immediately rises in my mind is: does the menu bar extend all the way to the top edge of the screen, so that one can click at the very edge and still get a menu? (this makes selecting menus entries easier)
Offline
What font are you using in windows titles?
I second that, the font is extremely nice
To get something done, a committee should consist of no more than three persons, two of them absent.
--
My Github
Offline
Nice work!
Can i find something like this to Xfce?Damn, it's so freakin' nice!
Hi! Every gtk applications (including xfce's) are changed to use mac-style menubar with my patch. It's not part of the desktop (unlike real mac).
Offline
What font are you using in windows titles?
http://aquila.deus.googlepages.com/LithosPro-Medium.ttf
http://aquila.deus.googlepages.com/LithosPro-Bold.ttf
http://aquila.deus.googlepages.com/LithosPro-Black.ttf
Offline
Thanks a lot
Offline
hmm, one question that immediately rises in my mind is: does the menu bar extend all the way to the top edge of the screen, so that one can click at the very edge and still get a menu? (this makes selecting menus entries easier)
ahh, not sure what you mean.
The menubar is positioned at (0, 0) and always have the same width as your screen, and it's on top of all normal windows.
Offline
¡Great modification!
Offline
What I meant was: I think there is a one-pixel border on top of the menubar, which makes it impossible to just "fling and click." (Instead you have to avoid a one-pixel dead area--you cant click on "File" if the mouse pointer is at Y=0).
It's just a small "usability concern." Something like... infinite space.
Offline
What I meant was: I think there is a one-pixel border on top of the menubar, which makes it impossible to just "fling and click." (Instead you have to avoid a one-pixel dead area--you cant click on "File" if the mouse pointer is at Y=0).
It's just a small "usability concern." Something like... infinite space.
Ah, I can't change that - it's theme-dependent.
Offline
It's just a small "usability concern." Something like... infinite space.
Its actually a pretty big concern, and is a major reason the mac menubar was designed that way. If there is a one-pixel border, would it be possible to position the bar at (0, -1) (not sure if X allows that)? Or maybe to set window decorations off?
Dusty
Offline
Simastrick wrote:It's just a small "usability concern." Something like... infinite space.
Its actually a pretty big concern, and is a major reason the mac menubar was designed that way. If there is a one-pixel border, would it be possible to position the bar at (0, -1) (not sure if X allows that)? Or maybe to set window decorations off?
Dusty
It's not a window decoration; It's your theme's internal setting.
Positioning the bar to y=-1 is doable, if your WM supports.
Offline
Is Amazing!!, really nice :-)...
Offline
It actually is a big concern for me, but most people seem not to care/notice such things, so I felt I had to downplay it... (silly me?)
(And yes it has nothing to do with window decorations.)
Offline
It actually is a big concern for me, but most people seem not to care/notice such things, so I felt I had to downplay it... (silly me?)
(And yes it has nothing to do with window decorations.)
Well, just get a good mouse and select bigger menu text
As I said, the menubar can be put to (0, -1) if your WM supports - but this would be very ugly! If you're sure, I can add it.
Offline
As I said, the menubar can be put to (0, -1) if your WM supports - but this would be very ugly! If you're sure, I can add it.
Why should this be ugly :?:
Haven't been here in a while. Still rocking Arch.
Offline
aquila_deus wrote:As I said, the menubar can be put to (0, -1) if your WM supports - but this would be very ugly! If you're sure, I can add it.
Why should this be ugly :?:
Because the distance to top edge and the distance to bottom edge would be different from the original theme's. That would cause imperfection!
Offline
Can't one make a theme that respects this behaviour? Just a thought, I really appreciate the work you did!
Haven't been here in a while. Still rocking Arch.
Offline
What kind of imperfection? It's just a one pixel border on top of the menu.
Offline