Gtk layered layout - gtk

I am building a simple interface using a 3 row GtkVbox. Inside middle row, I'd like to show a centered image and a small config panel. If config panel is shown, it must appear over the image. How could I simulate a layered panel where the config panel appers in an upper level than the image. Any ideas?
Regards

Overlaying widgets on top of each other isn't really what GTK is built for - you might be using the wrong tool for the job. Maybe you should check out Clutter?

I believe you can use GtkOverlay to put the panel over the image.

Related

How to fix the shape of the dashbord, esp. its parts?

I have built my first dashboard in tableau. When I am logged in and look at this, it looks fine, it consists of 2 horizontal blocks (on the left a double one, on the right it consists of three vizes). When I am logged out and look at the dashboard the right part shows only 1st viz correct, the other two are diminished and you can bearly see them. What might be the reason?
There could be a few things going on. Without a picture, it may be one or more of these:
Use Layout
Containers.
The layout containers will ensure that each part of the dashboard is
exactly where you want it relative to a parent container.
Use tiled
layouts. Floating layouts may cause dashboard parts to be in different places depending on the screen size.
Check to see if you are using Fixed, Automatic or Range sized dashboards. These can also make a difference in appearance based on screen size.
If you are using custom fonts, install them on server to ensure this isn't a part of the problem.
Please do share a picture (or preferably, the workbook) so further investigation can happen.
In the Dashboard tab -> Layout pane, check the Item hierarchy.
When a viz/sheet is dragged and dropped on to the dashboard, tableau, by default arranges them in tiled container.
If you have adjusted the width manually, disable the option fixed width which is pin symbol when sheet is selected.
Make sure that no tiled containers are present and all the sheets are dropped into respective Horizontal containers.
Adjust the width of the viz in the sheet to fit in the view.
These are some common resolutions. Share screenshot for much accurate solution.

How do you sort UI elements in Canvas?

I don't get how you sort UI elements Z-index in Unity inside a Canvas, is it by hierarchy order ?
I'm trying to do a settings screen like in this video: https://www.youtube.com/watch?v=-qNo1jloR_k
It's quite simple, you click on the button and it set the whole panel as first sibling in the hierarchy.
But this is what I get:
https://gyazo.com/cec14f21df2ded191875e6a8cfd9f124
Also, my gameplay panel had a red background, my graphics panel a green one, and my sound panel a yellow one.
I could avoid this problem by changing alpha on panels, but would like to make it work with z sorting... that I can't seem to understand on Unity.
Using unity 2017.1.2 and .NET 4.6 .
The child that is lower in the hierarchy is rendered on top of other ones.
Let's say there are 2 panels. panel1(red) and panel2(green).If the hierarchy is like this:
-panel1
-panel2
Then panel2 will be rendered on top of panel1. So, you'll see green panel.
Hope this answers your question.
Another suggestion, it is better to deactivate the unused panels and activate only the used panels. Because, if the unused panel is active, when it's not shown, it'll still take the processing power which is a waste. For example, if you have animation in the main menu, but currently you are showing the settings panel, your approach will keep the animations running in the main menu.

GTK3: Making a container aligned to bottom, filling horizontal space but not vertical

all.
I am writing an app in C with GTK3 and using Glade to build the UI.
What I am trying to do is making a container that will stay on the bottom of the frame, filling the horizontal space but not vertical. I will place a few buttons there and don't want them loose in the frame. Right now I just have enough code to show the window to see how it looks in runtime, focusing just on UI.
What I have tried so far:
GtkBox: would be perfect if I could adjust its height so I have free space above it, for another container. But it seems to take whatever free space is left (that is, the whole screen).
GtkPaned: would be perfect if I could prevent it from being resized in runtime and hide the handle. But, well, this is the purpose of this widget, so it doesn't seem to be possible.
GtkGrid: same thing as GtkBox.
For those who already worked with Borland C++ Builder or Delphi, it is the functionality of a "Panel" I'm trying to repeat. That is, you drop the container in the frame, align it to bottom (which makes it fill the horizontal space) and then you adjust the height in design time.
Any ideas? If you need more information, just let me know.
*EDIT: Alexander, this is when I try to expand on your comment, that is, using more than 1 button and container inside a container (see top right of Glade for the hierarchy).
When all buttons have Expand "Off", which works for 1 button, and when it is "On" (then I don't get to adjust the height anymore).
"No" to all buttons
"Yes" to all buttons
The simpliest solution: take GtkBox and use gtk_box_pack_end.
Another way is to control container align and expand behaviour (use gtk_widget_set_halign/gtk_widget_set_valign and gtk_widget_set_hexpand/gtk_widget_set_vexpand on the container itself)
Edit: didn't notice you are using glade. Create a gtkbox, add a child and change child's pack type
Also notice: if you want to add container near another container, you should pack both containers in another container.

set fix size of an java rcp4 Part

I prgram an application with Java and use RCP4.
Now I´d like to program an navigation Bar in my application.
The navigation Bar shoud have a fix width which shoud not be modifiable.
Can I do thas with a Part in the RCP4 application model?
I found no way to fix the size of a Part.
If your part belongs to Part Sash Container, you should create your own renderer (Something similar to org.eclipse.swt.custom.SashForm)
http://www.eclipse.org/forums/index.php/t/173646/ may be useful.
What about using a TrimBar? We embedded a navigation tree into the left-side Window Trim. TrimBar's can't be resized but will change size to accommodate what they contain (i.e. the left side trim bar's width will grow so that the tree will fit), but cannot be resized by the user.
If, however, you would like to use a Part, create a Part Sash Container to separate this Part from the rest of the items in your perspective and then add "NoMove" as a Tag to the Part Sash Container. This prevents the sash from being resized.

SWT TabFolder vertical orientation

Currently SWT's TabFolder supports only the TOP and BOTTOM styles, ie. it will only draw the tabs horizontally along the top or bottom of the control. This is unlike Swing's JTabbedPane, which gives the option of also orienting the tabs vertically, along the side of the control.
Can anyone suggest any workarounds to achieve a vertical orientation in SWT? Any suggestions of custom or 3rd-party components (or other alternative) would be appreciated.
I don't know of any SWT-compatible controls like that, but you could build your own alternative using a StackLayout and some control(s) to switch between the different "panels." Here's a simple example SWT Snippet.
You could also look at the code for CTabFolder and see if it would be straightforward to modify it to suite your needs.