Re: How can I scale widget smaller ?

Thank you Francis,

It's really friendly to use.

I would like to go further. Maybe is it possible to customize the logic of shortening and truncation ?
Example : "Document : 1" could become "Doc. 1" or "Docu. 1" "Docume. 1"

I looked in the code, but I got lost from
pango_renderer_draw_layout() in and his friend

Although I used >grep I can not find cases for the reference "..."

Do you know how I can do this?

2013/5/28 Francis (Grizzly) Smit <grizzly smit id au>
On 28/05/13 06:11, Maggio Mago wrote:
> Hello,
> Like Blender's GUI, i would like to shrink widgets. When resizing a
> panel, Blender shrink his Widgetscontrol.
> Gtk+3 does she planned a way to achieve it? If yes, how to get there ?
> PJ : Screen shot of Blender Panel
try this create your buttons empty and use add to ad a label set the
label ellisize mode to one of


using Gtk::Label::set_ellipsize     (     Pango::EllipsizeMode
mode    )

or you could burrow into your button to get it's label using
Gtk::Widget* Gtk::Bin::get_child     (         )

which buttons inherit from Gtk::Bin but the immediate child may not be
the label it could be a Gtk::Box to hold the label and an image so you'd
need to test with dynamic_cast<Gtk::Label*>(yourbutton->get_child()) etc


  .~.     In my life God comes first....
  /V\         but Linux is pretty high after that :-D
 /( )\    Francis (Grizzly) Smit

gtkmm-list mailing list
gtkmm-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]