slider size



hi!

i'm currently writeing applications for touchscreens and so i have to make
slider and range widgets bigger. actually i'm doing it this way:

  /* Tricky Part to make sliders usable for touchscreens */
  dummy = gtk_hscrollbar_new(NULL);
  GTK_RANGE_CLASS(GTK_OBJECT(dummy)->klass)->slider_width=SLIDER_WIDTH;
  GTK_RANGE_CLASS(GTK_OBJECT(dummy)->klass)->stepper_size=SLIDER_WIDTH;
  GTK_RANGE_CLASS(GTK_OBJECT(dummy)->klass)->stepper_slider_spacing=SLIDER_SPACE;
  GTK_RANGE_CLASS(GTK_OBJECT(dummy)->klass)->min_slider_size=SLIDER_LENGTH;
  dummy = gtk_vscrollbar_new(NULL);
  GTK_RANGE_CLASS(GTK_OBJECT(dummy)->klass)->slider_width=SLIDER_WIDTH;
  GTK_RANGE_CLASS(GTK_OBJECT(dummy)->klass)->stepper_size=SLIDER_WIDTH;
  GTK_RANGE_CLASS(GTK_OBJECT(dummy)->klass)->stepper_slider_spacing=SLIDER_SPACE;
  GTK_RANGE_CLASS(GTK_OBJECT(dummy)->klass)->min_slider_size=SLIDER_LENGTH;
  dummy = gtk_hscale_new(NULL);
  GTK_RANGE_CLASS(GTK_OBJECT(dummy)->klass)->slider_width=SLIDER_WIDTH;
  GTK_SCALE_CLASS(GTK_OBJECT(dummy)->klass)->slider_length=SLIDER_LENGTH;
  dummy = gtk_vscale_new(NULL);
  GTK_RANGE_CLASS(GTK_OBJECT(dummy)->klass)->slider_width=SLIDER_WIDTH;
  GTK_SCALE_CLASS(GTK_OBJECT(dummy)->klass)->slider_length=SLIDER_LENGTH;

but this looks a little bit like a "hack" to me ;-) and it does not work with
the scrollbar of a scrollable window (GtkTree). the slider_width seems to get
overwritten somehow.

btw.: does anybody know, how i can aplay a default font to my labels? a code
snip would be great!

thank you very much ...
clemens




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