Domanda

Are there some additional settings to configure pygtk before using it to build apps for touchscreen devices. I wish to make an application that will involve cutting, copying , pasting and deleting files and folders stored in a usb flash drive connected to a touch screen device so wanted to know.

È stato utile?

Soluzione

You can create and apply an rc file which makes the default GTK widgets more touch friendly.

Example rc file:

style "touch-style" {
    GtkPaned::handle-size = 30
    GtkRange::slider-width = 60
    GtkRange::stepper-size = 30
    GtkRange::activate-slider = 1
    GtkWidget::scroll-arrow-hlength = 30
    GtkWidget::scroll-arrow-vlength = 30
    GtkScale::slider-length = 60
    GtkScale::value-spacing = 10
    GtkScrollbar::min-slider-length = 100
    font_name = "sans 18"
}
class "GtkWidget" style "touch-style"

Use this is in your code like this:

gtk.rc_parse(filename)

Example of standard GTK slider, button, and scrollbar widgets:

Standard GTK

With the touch friendly style:

enter image description here

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top