[GTK3] Make VRAM viewer button bar slimmer

This commit is contained in:
Maximilian Mader 2019-10-03 16:04:22 +02:00
parent 5ad3705179
commit 2b2fdb6427
Signed by: Max
GPG Key ID: F71D56A3151C4FB3
4 changed files with 42 additions and 19 deletions

View File

@ -479,6 +479,11 @@ static void activate(GApplication *app, gpointer user_data_gptr) {
create_fallback_canvas(); create_fallback_canvas();
} }
GdkScreen *screen = gdk_screen_get_default();
GtkCssProvider *provider = gtk_css_provider_new();
gtk_css_provider_load_from_resource(provider, RESOURCE_PREFIX "css/main.css");
gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
gtk_application_add_window(GTK_APPLICATION(app), GTK_WINDOW(main_window)); gtk_application_add_window(GTK_APPLICATION(app), GTK_WINDOW(main_window));
gtk_widget_show_all(GTK_WIDGET(main_window)); gtk_widget_show_all(GTK_WIDGET(main_window));

View File

@ -0,0 +1,10 @@
.vram-viewer-button-bar {
margin-bottom: 4px;
}
.vram-viewer-button-bar button {
padding: 2px 4px;
min-height: 11px;
min-width: 12px;
font-size: 0.8rem;
}

View File

@ -595,23 +595,6 @@ Maximilian Mader https://github.com/max-m</property>
<property name="position">3</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkCheckButton" id="aspect_ratio_toggle">
<property name="label" translatable="yes">Keep Aspect Ratio</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="margin_top">5</property>
<property name="margin_bottom">10</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_keep_aspect_ratio_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child> <child>
<object class="GtkCheckButton" id="integer_scaling_toggle"> <object class="GtkCheckButton" id="integer_scaling_toggle">
<property name="label" translatable="yes">Use Integer Scaling</property> <property name="label" translatable="yes">Use Integer Scaling</property>
@ -629,6 +612,23 @@ Maximilian Mader https://github.com/max-m</property>
<property name="position">4</property> <property name="position">4</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkCheckButton" id="aspect_ratio_toggle">
<property name="label" translatable="yes">Keep Aspect Ratio</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="margin_top">5</property>
<property name="margin_bottom">10</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_keep_aspect_ratio_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child> <child>
<object class="GtkLabel" id="menubar_override_selector_label"> <object class="GtkLabel" id="menubar_override_selector_label">
<property name="can_focus">False</property> <property name="can_focus">False</property>
@ -1246,6 +1246,9 @@ Maximilian Mader https://github.com/max-m</property>
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<style>
<class name="vram-viewer-button-bar"/>
</style>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1315,7 +1318,7 @@ Maximilian Mader https://github.com/max-m</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">False</property>
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
@ -1388,10 +1391,13 @@ Maximilian Mader https://github.com/max-m</property>
<property name="position">4</property> <property name="position">4</property>
</packing> </packing>
</child> </child>
<style>
<class name="vram-viewer-button-bar"/>
</style>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">False</property>
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>

View File

@ -6,6 +6,8 @@
<file preprocess="xml-stripblanks">gtk/menus-common.ui</file> <file preprocess="xml-stripblanks">gtk/menus-common.ui</file>
<file preprocess="xml-stripblanks">gtk/menus-traditional.ui</file> <file preprocess="xml-stripblanks">gtk/menus-traditional.ui</file>
<file compressed="true">css/main.css</file>
<file alias="logo_256.png">pixmaps/logo/logo_256.png</file> <file alias="logo_256.png">pixmaps/logo/logo_256.png</file>
<file alias="logo_128.png">pixmaps/logo/logo_128.png</file> <file alias="logo_128.png">pixmaps/logo/logo_128.png</file>
<file alias="logo_64.png">pixmaps/logo/logo_64.png</file> <file alias="logo_64.png">pixmaps/logo/logo_64.png</file>