I want to create some kind of toolbar, consisting of buttons. I used ButtonBox, and put inside some toggle buttons, color button and one regular button.
I want to accomplish two things:
If I didn't wanted second thing, I could just use set_valign
so that toolbar would shrink to the right.
I tried adding empty Gtk::Box after color button and allowing it to expand, and this keeps rightmost button on the right, but it still leaves margins between buttons, no matter what parameters for pack_start
and pack_end
I try - there is two optional boolean parameters, but neither of them seem to do anything.
Here is how it looks normally:
Here is how it looks with empty box:
So what should I do to remove margin between buttons, and is there a better way to keep some buttons on the right, and some on the left?
ButtonBox will always have space between buttons. If you want the buttons without space between, use a regular Box.
Otherwise you did the right thing. Use a Box to move the right button to the edge. Sometimes you can achieve the same affect by using pack_start
and pack_end
to different buttons, all within the same Box.