Rich custom GUI with Glade and CSS
ADEC 2013 GU
Brno, Czech Republic
August 1 - 8
by Juan Pablo Ugarte
- GUADEC●
The GNOME
TM Conference
Rich custom GUI with Glade and CSS by Juan Pablo Ugarte GU ADEC - - PowerPoint PPT Presentation
Rich custom GUI with Glade and CSS by Juan Pablo Ugarte GU ADEC 2013 Brno, Czech Republic August 1 - 8 TM Conference The GNOME GUADEC Graphical User Intefaces Graphical User Intefaces GNOME 2.10 screenshot showing Rhythmbox,
Rich custom GUI with Glade and CSS
ADEC 2013 GU
Brno, Czech Republic
August 1 - 8
by Juan Pablo Ugarte
The GNOME
TM ConferenceGNOME 2.10 screenshot showing Rhythmbox, GThumb, gedit and Nautilus Graphical User Intefaces Graphical User Intefaces
XMMS/Audacious Winamp classic interface Audacious Gtk Interface Graphical User Intefaces Graphical User Intefaces
SyncTV artist design SyncTV Desktop Player - Mockup SyncTV Desktop Player - Mockup
SyncTV Desktop Player - Gtk 2.0 SyncTV Desktop Player - Gtk 2.0
SyncTV Desktop Player - Gtk 2.0 SyncTV Desktop Player - Gtk 2.0
Enough with the screenshots! ∙ Case Study: Baccarat display for Casinos ∙ Artist mockup ∙ CSS implementation ∙ Final Product
Rich custom GUI with Glade and CSS Rich custom GUI with Glade and CSS
Use images for: ∙ Logo ∙ Backgrounds ∙ Icons CSS for: ∙ all text ∙ custom elements (frames and grid) << Min/Max Bet Frame << Play Grid << Information Frame Baccarat Mockup Baccarat Mockup
Glade and the widget hierarchy Glade and the widget hierarchy
Glade + CSS Glade + CSS
.font_bet { color: #47423f; font-size: 44px; font-weight:bold; }
+
GtkFrame.frame_bet { border: 6px solid; border-color: #c1c0bf; border-radius: 24px; background-color: white; box-shadow: 2px 2px 4px black inset; }
=
50 10 MAX: MIN:
Implementing Bet Frame Implementing Bet Frame
GtkFrame.frame_shadow { border: 0px; padding: 0px 4px 4px 0px; border-radius: 16px; background-color: #47423F; }
+
GtkFrame.frame_default { border: 0px; padding: 0px; border-radius: 16px; background-color: #5c7dbe; }
+
.font_default { color: white; font-size: 42px; text-shadow: 2px 2px 2px black; }
=
Tie: 03 Banker:23 Player: 43
Implementing Info Frame Implementing Info Frame
GtkFrame.frame_grid { border: 8px solid #c1c0bf; border-radius: 32px; background-image: -gtk-gradient (linear, left top, right bottom, from(#9d9a99), to(#d6d5d4)); box-shadow: 2px 2px 2px grey inset; } GtkImage.grid_child_odd { background-color: #ededeb; } GtkGrid.frame_grid > GtkImage { box-shadow: 2px 2px 2px grey inset; }
Implementing the Play Grid Implementing the Play Grid
@keyframes player_transition { 0% { background-image: none;} 100% { background-image: url("blue.png");} } GtkImage.grid_bottom_left { border-radius: 0px 0px 0px 22px; } GtkImage.grid_bottom_right { border-radius: 0px 0px 22px 0px; } GtkImage.grid_top_right { border-radius: 0px 22px 0px 0px; } GtkImage.grid_top_left { border-radius: 22px 0px 0px 0px; } GtkGrid.frame_grid > GtkImage.bg_player_anim { animation: player_transition .5s 1 linear; }
Baccarat CSS/GTK implementation Baccarat CSS/GTK implementation
Finished Product Baccarat CSS/GTK implementation Baccarat CSS/GTK implementation
xjuan@Xjuan:~/sources/glade$ git checkout master xjuan@Xjuan:~/sources/glade$ git rebase css /* * TODO: * * Add a way to disable CSS animations * in the workspace. * * Add <style type="text/css" href="file.css"> * to GtkBuilder?????????? * */ while (slow ()) make_it_faster ();
To Do List To Do List
BTW this presentation was made with Glade and CSS
Email: juanpablougarte@gmail.com jpu@gnome.org Blog: blogs.gnome.org/xjuan IRC: xjuan Handout: http://people.gnome.org/~jpu/docs\ /2013-GUADEC/
██████████████ ██ ██ ██ ██ ██████ ██████████████ ██ ██ ████████ ██ ██ ██ ██ ██ ██ ██ ██████ ██ ██████ ██ ██ ██ ██ ██████ ██ ██ ██████ ██ ██████ ████ ████████ ██ ██ ██████ ██ ██ ██████ ██ ██ ████ ██ ██ ██ ██████ ██ ██ ██ ████ ██ ████████ ██ ██ ██████████████ ██ ██ ██ ██ ██ ██ ██ ██████████████ ██ ████████████████ ████████ ██ ██ ██████████████████ ██ ██████ ██ ██ ██ ██ ██ ██ ██ ████ ████████████ ██ ████ ████ ██████████ ██ ██ ████ ██ ████ ██████████ ████████ ████ ██ ████████████ ██ ██ ████ ██ ██████ ████████ ██ ██ ██ ████ ████ ████ ████ ██ ████ ██ ████ ██████ ████████████ ██ ██ ██ ██████ ████████ ████ ██ ██ ██ ██ ██ ██████ ██ ██ ████ ██████████ ██ ██ ██ ██ ████ ██ ██ ████ ██ ██ ████ ██ ██ ██ ████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ████ ██ ██████████ ██████ ██ ████ ██ ██ ████ ████████ ██ ██ ██████ ██████████████ ██ ██ ██ ██ ██ ██████████ ██████████████ ████ ██████████ ██ ████ ██ ██ ██ ██ ██████████ ██ ██ ██ ████ ██ ██████ ██ ██ ████ ████ ████████████████ ██ ██████ ██ ██ ████ ██████ ██ ██ ████ ██ ██ ██ ██████ ██ ██ ██ ████ ██████ ██ ██ ██ ██ ██ ██ ██████ ██ ██████ ██ ████████ ██ ██████████████ ██ ██ ██ ██████ ██ ██