| menu |<=titlebar
the layout is above ,how can i put the menu in the middle of the titlebar of the gtkwindow?
you will have to disable standard titlebar, and paint one youself.
also, it depends on the OS. when running in mswindows you can make custom titlebar which uses current style (this has nothing to do with GTK).
under X11 you can't normally "extend" titlebar drawing, because it's done by WM in another process.
Related
I am new in GTK theming. Now I am trying to create theme GTK for XFCE. Everything is OK but how to remove this ugly shadow under the panel?
I don't think that shadow can be removed via a gtk theme, it is drawn by the compositor. If you are using xfwm4, to disable it open Window Manager Tweaks, go to the Compositor tab and uncheck the "Show shadows under dock windows" option.
Running xprop | grep TYPE and pointing to panel, one can learn that its type is _NET_WM_WINDOW_TYPE_DOCK and according to f.do specs:
_NET_WM_WINDOW_TYPE_DOCK indicates a dock or panel feature. Typically a Window Manager would keep such windows on top of all other windows.
In elementary OS Loki, for applications like gvim, urxvt and Xephyr, there will be a title bar added to the application window. Is there anyway to get rid of the title bar?
Vim with title bar
urxvt with title bar
The title bar is called window decoration. Window decoration depends on the window manager, as stated in the documentation:
By default, windows are decorated with a title bar, resize controls,
etc.
Some window managers allow GTK+ to disable these decorations, creating
a borderless window. If you set the decorated property to false using
this function, GTK+ will do its best to convince the window manager
not to decorate the window. Depending on the system, this function may
not have any effect when called on a window that is already visible,
so you should call it before calling show.
On Windows, this function always works, since there’s no window
manager policy involved.
Try using window.set_decorated(false);
I don't know what display manager you are using but I believe Loki ships with GNOME so try looking into some of the Gnome extensions, e.g. PixelSaver or Maximus, though the latter may need a few tweaks as it's been without maintenance for a bit.
Here my eclipse window. I want to save all these space in order to gain vertical visibility (for my text editor). And I am unable to find the way to do it.
I'm pretty sure you cannot disable either status bar nor toolbar. There is kind of solution though:
You can open a file and drag its tab with file name outside of eclipse window so it is detached from the main eclipse window. Then you can maximize this window and look on the code in kind of full-screen mode.
I like to adjust or disable a feature of gtk3 (or gnome-shell?) because it causes a delay or at least need to remove the delay when bringing a window in/out of focus. My multi window application suffers from this delay:
I see is that all widgets like buttons, entries, etc. are set to in-sensitive/gray look at time the window they are contained is loosing focus and they return to normal when the window focus returns. I tried to turn off animations, but that does not disable this behavior.
My old program version based on gtk2 based does not have this feature (same gnome shell). So I conclude gtk3 is some how managing this.
I so far was not able to find out how to disable this.
This is part of the default (Adwaita) desktop theme, and as such you can't disable it for one application. Each window's widgets get the :backdrop CSS pseudo-class when it is not the active window, and the Adwaita theme styles them that way.
Your best bet is to pick another desktop theme.
I'm trying to use GTK+ 2.0 for my GUI, but I'm not sure how I could implement a menu that slides out when a button is clicked. Making a menu disappear/re-appear instantaneously would not be difficult to do as it requires a simple change to the visibility property. This app is being developed on Windows, but I'm also planning to port it over to Linux. So any ideas on how to achieve menu transitions that work on Windows and Linux?
Maybe you can make a menu widget yourself. Last time, I made a menu widget inherited from gtk dialog. You can move the dialog anywhere you want.