Test fix for image size

pull/58/head
parent d4ee9e9ce7
commit 1c7724870a

@ -855,11 +855,11 @@ int cur_slide=0;
int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled); int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled);
int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled) { int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled) {
int width = gtk_widget_get_allocated_width(gtk_widget_get_parent(gtk_widget_get_parent(GTK_WIDGET(target)))); int width = gtk_widget_get_allocated_width((gtk_widget_get_parent(GTK_WIDGET(target))));
int height = gtk_widget_get_allocated_height(gtk_widget_get_parent(gtk_widget_get_parent(GTK_WIDGET(target)))); int height = gtk_widget_get_allocated_height((gtk_widget_get_parent(GTK_WIDGET(target))));
int newImgWidthDef = (width <= 217) ? width : width - 30; int newImgWidthDef = (width <= 217) ? width : width - 30;
int newImgHeightDef = (height <= 120) ? height : height - 217; int newImgHeightDef = (height <= 120) ? height : height - 80;
int originalWidth = gdk_pixbuf_get_width(pixbuf_unscaled); int originalWidth = gdk_pixbuf_get_width(pixbuf_unscaled);
int originalHeight = gdk_pixbuf_get_height(pixbuf_unscaled); int originalHeight = gdk_pixbuf_get_height(pixbuf_unscaled);
@ -2364,6 +2364,10 @@ main_window *yon_main_window_complete(){
g_signal_connect(G_OBJECT(widgets->AddButton),"clicked",G_CALLBACK(on_keyboard_clicked),widgets); g_signal_connect(G_OBJECT(widgets->AddButton),"clicked",G_CALLBACK(on_keyboard_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->RemoveButton),"clicked",G_CALLBACK(on_keyboard_removed),widgets); g_signal_connect(G_OBJECT(widgets->RemoveButton),"clicked",G_CALLBACK(on_keyboard_removed),widgets);
gtk_style_context_add_class(gtk_widget_get_style_context(gtk_widget_get_parent(widgets->RegionImage)),"errorBox");
gtk_style_context_add_class(gtk_widget_get_style_context(gtk_widget_get_parent(widgets->SlidesImage)),"errorBox");
gtk_style_context_add_class(gtk_widget_get_style_context(gtk_widget_get_parent(widgets->KeyboardImage)),"errorBox");
g_signal_connect(G_OBJECT(widgets->UsersToggle),"toggled",G_CALLBACK(on_toggle_block),NULL); g_signal_connect(G_OBJECT(widgets->UsersToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
g_signal_connect(G_OBJECT(widgets->LicenceToggle),"toggled",G_CALLBACK(on_toggle_block),NULL); g_signal_connect(G_OBJECT(widgets->LicenceToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
g_signal_connect(G_OBJECT(widgets->WelcomeToggle),"toggled",G_CALLBACK(on_toggle_block),NULL); g_signal_connect(G_OBJECT(widgets->WelcomeToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);

@ -1493,9 +1493,15 @@ and help you install UBLinux on your computer</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkImage" id="SlidesImage"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Installation</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="foreground" value="#33722f2e7a06"/>
<attribute name="size" value="15360"/>
</attributes>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -1503,6 +1509,17 @@ and help you install UBLinux on your computer</property>
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkImage" id="SlidesImage">
<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">1</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="position">6</property> <property name="position">6</property>

@ -123,7 +123,7 @@ msgstr "Разделы"
#: source/ubl-strings.h:17 #: source/ubl-strings.h:17
msgid "Installation" msgid "Installation"
msgstr "Установить" msgstr "Установка"
#: source/ubl-strings.h:18 source/ubl-strings.h:33 #: source/ubl-strings.h:18 source/ubl-strings.h:33
msgid "Location" msgid "Location"

Loading…
Cancel
Save