Merge pull request #466 from anlsh/master
Change background color on Linux
This commit is contained in:
commit
db6e978276
|
@ -507,6 +507,7 @@ static GtkWidget *pWindow;
|
||||||
static GtkWidget *pToolBar;
|
static GtkWidget *pToolBar;
|
||||||
static GtkWidget *pStatusBar;
|
static GtkWidget *pStatusBar;
|
||||||
static GtkWidget *pDrawingArea;
|
static GtkWidget *pDrawingArea;
|
||||||
|
static GtkWidget *pContentBox;
|
||||||
|
|
||||||
struct nds_screen_t {
|
struct nds_screen_t {
|
||||||
guint gap_size;
|
guint gap_size;
|
||||||
|
@ -3013,8 +3014,16 @@ common_gtk_main(GApplication *app, gpointer user_data)
|
||||||
pToolBar = GTK_WIDGET(gtk_builder_get_object(builder, "toolbar"));
|
pToolBar = GTK_WIDGET(gtk_builder_get_object(builder, "toolbar"));
|
||||||
pDrawingArea = GTK_WIDGET(gtk_builder_get_object(builder, "drawing-area"));
|
pDrawingArea = GTK_WIDGET(gtk_builder_get_object(builder, "drawing-area"));
|
||||||
pStatusBar = GTK_WIDGET(gtk_builder_get_object(builder, "status-bar"));
|
pStatusBar = GTK_WIDGET(gtk_builder_get_object(builder, "status-bar"));
|
||||||
|
pContentBox = GTK_WIDGET(gtk_builder_get_object(builder, "content-box"));
|
||||||
g_object_unref(builder);
|
g_object_unref(builder);
|
||||||
|
|
||||||
|
/* Set colors for content box background and status bar text */
|
||||||
|
GdkRGBA color_black = { 0.0, 0.0, 0.0, 1.0 };
|
||||||
|
gtk_widget_override_background_color(pContentBox, GTK_STATE_FLAG_NORMAL, &color_black);
|
||||||
|
|
||||||
|
GdkRGBA color_soft_gray = { 0.8, 0.8, 0.8, 1.0 };
|
||||||
|
gtk_widget_override_color(pStatusBar, GTK_STATE_FLAG_NORMAL, &color_soft_gray);
|
||||||
|
|
||||||
gtk_application_add_window(GTK_APPLICATION(app), GTK_WINDOW(pWindow));
|
gtk_application_add_window(GTK_APPLICATION(app), GTK_WINDOW(pWindow));
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(pWindow), "destroy", G_CALLBACK(DoQuit), NULL);
|
g_signal_connect(G_OBJECT(pWindow), "destroy", G_CALLBACK(DoQuit), NULL);
|
||||||
|
|
|
@ -79,25 +79,36 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkDrawingArea" id="drawing-area">
|
<object class="GtkBox" id="content-box">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can-focus">False</property>
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkDrawingArea" id="drawing-area">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkStatusbar" id="status-bar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkStatusbar" id="status-bar">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can-focus">False</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
Loading…
Reference in New Issue