Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/09/2015, 15:41
Avatar de jc_moj
jc_moj
 
Fecha de Ingreso: septiembre-2009
Ubicación: Andalucía
Mensajes: 137
Antigüedad: 14 años, 7 meses
Puntos: 12
Respuesta: Gtk Toolbar, se redimensiona

Hola

Cita:
Iniciado por Carlangueitor Ver Mensaje
Pues igual y hay algo que puedas arreglar en el código.
Un ejemplo muy muy sencillo, sacado de la documentación, en vala:

Código C++:
Ver original
  1. public class Application : Gtk.Window {
  2.     public Application () {
  3.         // Prepare Gtk.Window:
  4.         this.title = "My Gtk.Toolbar";
  5.         this.window_position = Gtk.WindowPosition.CENTER;
  6.         this.destroy.connect (Gtk.main_quit);
  7.         this.set_default_size (350, -1);
  8.  
  9.  
  10.         // The Toolbar:
  11.         Gtk.Toolbar bar = new Gtk.Toolbar ();
  12.         this.add (bar);
  13.  
  14.  
  15.         // Toolbar content:
  16.         Gtk.Image img = new Gtk.Image.from_icon_name ("document-open", Gtk.IconSize.SMALL_TOOLBAR);
  17.         Gtk.ToolButton button1 = new Gtk.ToolButton (img, null);
  18.         button1.clicked.connect (() => {
  19.             stdout.printf ("Button 1\n");
  20.         });
  21.         bar.add (button1);
  22.  
  23.         img = new Gtk.Image.from_icon_name ("window-close", Gtk.IconSize.SMALL_TOOLBAR);
  24.         Gtk.ToolButton button2 = new Gtk.ToolButton (img, null);
  25.         button2.clicked.connect (() => {
  26.             stdout.printf ("Button 2\n");
  27.         });
  28.         bar.add (button2);
  29.     }
  30.  
  31.     public static int main (string[] args) {
  32.         Gtk.init (ref args);
  33.  
  34.         Application app = new Application ();
  35.         app.show_all ();
  36.         Gtk.main ();
  37.         return 0;
  38.     }
  39. }

Cita:
Iniciado por Carlangueitor Ver Mensaje
También un pantallazo de lo que te refieres sería muy util.


Solo tiene la barra de herramientas, pero es igual, ocurre lo mismo metiendo más componentes en las ventana, layout etc. Como se ve, la ventana de la izquierda la ha agrandado y la barra de herramientas se a agrandado también, lo que yo quiero es que se quede con un tamaño fijo arriba del todo.

Un saludo