diff options
author | flavio <fdanesse@gmail.com> | 2013-05-26 21:14:34 (GMT) |
---|---|---|
committer | flavio <fdanesse@gmail.com> | 2013-05-26 21:14:34 (GMT) |
commit | 34643e9b19dd61951333dc633b7fa3021830af35 (patch) | |
tree | 143ba00bf1e47af76fea7ad4a15c95f341ffa1be | |
parent | 550ef1702eb6bb0cbead783ac875d926f681a680 (diff) |
Agregar estilo css
-rw-r--r-- | BasePanel.py | 4 | ||||
-rw-r--r-- | Estilo.css | 53 | ||||
-rw-r--r-- | IdeMain.py | 16 | ||||
-rw-r--r-- | Widgets.py | 9 | ||||
-rw-r--r-- | WorkPanel.py | 2 |
5 files changed, 83 insertions, 1 deletions
diff --git a/BasePanel.py b/BasePanel.py index c8c24a1..bbe4b92 100644 --- a/BasePanel.py +++ b/BasePanel.py @@ -44,10 +44,14 @@ class BasePanel(Gtk.Paned): Archivos y terminales. """ + __gtype_name__ = 'BasePanel' + def __init__(self): Gtk.Paned.__init__(self, orientation=Gtk.Orientation.HORIZONTAL) + self.set_border_width(5) + self.workpanel = WorkPanel() self.infonotebook = InfoNotebook() diff --git a/Estilo.css b/Estilo.css new file mode 100644 index 0000000..e93251c --- /dev/null +++ b/Estilo.css @@ -0,0 +1,53 @@ +/*http://wiki.xfce.org/howto/gtk_theme*/ +/*https://developer.gnome.org/gtk3/3.0/GtkCssProvider.html*/ +/*background: url{../images/imagen.png} no-repeat;*/ + +/* Contenedores */ +GtkWindow { + background-color: #edf5ff; + color: #000000; +} + +DialogoProyecto { + background-color: #edf5ff; + color: #000000; + background-image: -gtk-gradient(linear, + left top, left bottom, + from(shade(#edf5ff, 0.50)), + to(shade(#edf5ff, 1.00))); +} + +BasePanel { + background-color: #edf5ff; +} + +WorkPanel { + background-color: #edf5ff; +} + +/* Widgets */ + +Menu { + background-color: #000000; + color: #ffffff; +} + +ToolbarArchivo { + background-color: #ffffff; + background-image: -gtk-gradient(linear, + left top, left bottom, + from(shade(#edf5ff, 0.50)), + to(shade(#edf5ff, 1.00))); +} + +ToolbarProyecto { + background-color: #ffffff; + background-image: -gtk-gradient(linear, + left top, left bottom, + from(shade(#edf5ff, 0.50)), + to(shade(#edf5ff, 1.00))); +} + +ToolbarTerminal { + background-color: #edf5ff; +} @@ -25,6 +25,7 @@ import sys import json from gi.repository import Gtk +from gi.repository import Gdk from Widgets import Menu #from Widgets import MainToolbar @@ -41,6 +42,19 @@ BatovideWorkSpace = os.path.join(home, 'BatovideWorkSpace') if not os.path.exists(BatovideWorkSpace): os.mkdir(BatovideWorkSpace) +PATH = os.path.dirname(__file__) + +screen = Gdk.Screen.get_default() +css_provider = Gtk.CssProvider() +style_path = os.path.join(PATH, "Estilo.css") +css_provider.load_from_path(style_path) +context = Gtk.StyleContext() + +context.add_provider_for_screen( + screen, + css_provider, + Gtk.STYLE_PROVIDER_PRIORITY_USER) + class IdeMain(Gtk.Window): def __init__(self): @@ -51,7 +65,7 @@ class IdeMain(Gtk.Window): #self.set_icon_from_file(".png") self.set_resizable(True) self.set_size_request(640, 480) - self.set_border_width(2) + self.set_border_width(5) self.set_position(Gtk.WindowPosition.CENTER) base_widget = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) @@ -56,6 +56,9 @@ class Menu(Gtk.MenuBar): """ Toolbar Principal. """ + + __gtype_name__ = 'Menu' + __gsignals__ = { 'accion': (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE, (GObject.TYPE_STRING,))} @@ -325,6 +328,8 @@ class DialogoProyecto(Gtk.Dialog): Diálogo para crear un nuevo proyecto. """ + __gtype_name__ = 'DialogoProyecto' + def __init__(self, parent_window = None, title = "Crear Proyecto Nuevo"): @@ -768,6 +773,8 @@ class ToolbarProyecto(Gtk.Toolbar): Toolbar para el proyecto. """ + __gtype_name__ = 'ToolbarProyecto' + def __init__(self): Gtk.Toolbar.__init__(self) @@ -796,6 +803,8 @@ class ToolbarArchivo(Gtk.Toolbar): Toolbar para el archivo """ + __gtype_name__ = 'ToolbarArchivo' + def __init__(self): Gtk.Toolbar.__init__(self) diff --git a/WorkPanel.py b/WorkPanel.py index cc78914..36f6ba4 100644 --- a/WorkPanel.py +++ b/WorkPanel.py @@ -40,6 +40,8 @@ class WorkPanel(Gtk.Paned): zona inferior: terminales. """ + __gtype_name__ = 'WorkPanel' + __gsignals__ = { 'new_select': (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE, (GObject.TYPE_STRING, |