Commit a8d9a859 authored by Adrien Plazas's avatar Adrien Plazas

Fit a small screen

parent 8076e7e0
Pipeline #37238 failed with stage
in 9 seconds
......@@ -31,8 +31,8 @@
</object>
<object class="GtkApplicationWindow" id="window_software">
<property name="can_focus">False</property>
<property name="default-width">1200</property>
<property name="default-height">800</property>
<property name="default-width">360</property>
<property name="default-height">640</property>
<property name="title" translatable="yes">Software</property>
<property name="icon_name">org.gnome.Software</property>
<child>
......@@ -76,7 +76,7 @@
<object class="GtkButtonBox" id="buttonbox_main">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">center</property>
<property name="layout_style">expand</property>
<style>
<class name="linked"/>
</style>
......@@ -85,10 +85,59 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<property name="label" translatable="yes" comments="Translators: A label for a button to show all available software.">_All</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="valign">fill</property>
<property name="spacing">2</property>
<child>
<object class="GtkImage" id="button_all_icon">
<property name="visible">True</property>
<property name="icon_name">org.gnome.Software-symbolic</property>
<property name="icon_size">1</property>
<style>
<class name="image-button"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="button_all_label">
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="halign">center</property>
<property name="label" translatable="yes" comments="Translators: A label for a button to show all available software.">_All</property>
<property name="mnemonic_widget">button_all</property>
<attributes>
<attribute name="scale" value="0.7"/>
</attributes>
<style>
<class name="text-button"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="button_all_a11y">
<property name="accessible_name" translatable="yes" comments="Translators: A label for a button to show all available software.">_All</property>
</object>
</child>
<style>
<class name="toolbar-primary-buttons-software"/>
<class name="flat"/>
</style>
</object>
<packing>
......@@ -103,11 +152,48 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
<object class="GtkBox" id="button_installed_box">
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="halign">fill</property>
<property name="spacing">6</property>
<property name="orientation">vertical</property>
<property name="valign">fill</property>
<property name="spacing">2</property>
<child>
<object class="GtkBox" id="button_installed_box">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="halign">center</property>
<property name="spacing">6</property>
<child>
<object class="GtkImage" id="button_installed_icon">
<property name="visible">True</property>
<property name="icon_name">view-grid-symbolic</property>
<property name="icon_size">1</property>
<style>
<class name="image-button"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="button_installed_counter">
<property name="width-chars">1</property>
<attributes>
<attribute name="scale" value="0.7"/>
</attributes>
<style>
<class name="counter-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkLabel" id="button_installed_label">
<property name="visible">True</property>
......@@ -115,6 +201,9 @@
<property name="halign">center</property>
<property name="label" translatable="yes" comments="Translators: A label for a button to show only software which is already installed.">_Installed</property>
<property name="mnemonic_widget">button_installed</property>
<attributes>
<attribute name="scale" value="0.7"/>
</attributes>
<style>
<class name="text-button"/>
</style>
......@@ -124,22 +213,16 @@
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="button_installed_counter">
<property name="width-chars">2</property>
<style>
<class name="counter-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</object>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="button_installed_a11y">
<property name="accessible_name" translatable="yes" comments="Translators: A label for a button to show only software which is already installed.">_Installed</property>
</object>
</child>
<style>
<class name="toolbar-primary-buttons-software"/>
<class name="flat"/>
</style>
</object>
<packing>
......@@ -154,11 +237,48 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
<object class="GtkBox" id="button_updates_box">
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="halign">fill</property>
<property name="spacing">6</property>
<property name="orientation">vertical</property>
<property name="valign">fill</property>
<property name="spacing">2</property>
<child>
<object class="GtkBox" id="button_updates_box">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="halign">center</property>
<property name="spacing">6</property>
<child>
<object class="GtkImage" id="button_updates_icon">
<property name="visible">True</property>
<property name="icon_name">software-update-available-symbolic</property>
<property name="icon_size">1</property>
<style>
<class name="image-button"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="button_updates_counter">
<property name="width-chars">1</property>
<attributes>
<attribute name="scale" value="0.7"/>
</attributes>
<style>
<class name="counter-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkLabel" id="button_updates_label">
<property name="visible">True</property>
......@@ -166,6 +286,9 @@
<property name="halign">center</property>
<property name="label" translatable="yes" comments="Translators: A label for a button to show only updates which are available to install.">_Updates</property>
<property name="mnemonic_widget">button_updates</property>
<attributes>
<attribute name="scale" value="0.7"/>
</attributes>
<style>
<class name="text-button"/>
</style>
......@@ -175,22 +298,16 @@
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="button_updates_counter">
<property name="width-chars">2</property>
<style>
<class name="counter-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</object>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="button_updates_a11y">
<property name="accessible_name" translatable="yes" comments="Translators: A label for a button to show only updates which are available to install.">_Updates</property>
</object>
</child>
<style>
<class name="toolbar-primary-buttons-software"/>
<class name="flat"/>
</style>
</object>
<packing>
......@@ -314,7 +431,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="activates_default">True</property>
<property name="width_request">500</property>
<property name="width_request">300</property>
<property name="max_length">100</property>
<property name="hexpand">True</property>
<property name="halign">center</property>
......@@ -460,6 +577,7 @@
<child>
<object class="GtkStack" id="stack_main">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<child>
<object class="GsOverviewPage" id="overview_page">
<property name="visible">True</property>
......
......@@ -632,7 +632,7 @@ gs_details_page_refresh_screenshots (GsDetailsPage *self)
GPtrArray *screenshots;
AsScreenshot *ss;
GtkWidget *label;
GtkWidget *list;
GtkWidget *flow;
GtkWidget *ssimg;
guint i;
......@@ -710,12 +710,12 @@ gs_details_page_refresh_screenshots (GsDetailsPage *self)
/* use a slightly larger screenshot if it's the only screenshot */
if (screenshots->len == 1) {
gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
AS_IMAGE_LARGE_WIDTH,
AS_IMAGE_LARGE_HEIGHT);
320,
240);
} else {
gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
AS_IMAGE_NORMAL_WIDTH,
AS_IMAGE_NORMAL_HEIGHT);
320,
240);
}
gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), NULL);
gtk_box_pack_start (GTK_BOX (self->box_details_screenshot_main), ssimg, FALSE, FALSE, 0);
......@@ -726,10 +726,10 @@ gs_details_page_refresh_screenshots (GsDetailsPage *self)
if (screenshots->len < 2)
return;
list = gtk_list_box_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (list), "image-list");
gtk_widget_show (list);
gtk_box_pack_start (GTK_BOX (self->box_details_screenshot_thumbnails), list, FALSE, FALSE, 0);
flow = gtk_flow_box_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (flow), "image-list");
gtk_widget_show (flow);
gtk_box_pack_start (GTK_BOX (self->box_details_screenshot_thumbnails), flow, FALSE, FALSE, 0);
for (i = 0; i < screenshots->len; i++) {
ss = g_ptr_array_index (screenshots, i);
ssimg = gs_screenshot_image_new (self->session);
......@@ -740,14 +740,17 @@ gs_details_page_refresh_screenshots (GsDetailsPage *self)
gtk_style_context_add_class (gtk_widget_get_style_context (ssimg),
"screenshot-image-thumb");
gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), NULL);
gtk_list_box_insert (GTK_LIST_BOX (list), ssimg, -1);
gtk_flow_box_insert (GTK_FLOW_BOX (flow), ssimg, -1);
g_object_set (G_OBJECT (ssimg), "margin", 2, NULL);
gtk_widget_set_visible (ssimg, TRUE);
}
gtk_list_box_set_selection_mode (GTK_LIST_BOX (list), GTK_SELECTION_BROWSE);
gtk_list_box_select_row (GTK_LIST_BOX (list),
gtk_list_box_get_row_at_index (GTK_LIST_BOX (list), 0));
g_signal_connect (list, "row-selected",
gtk_orientable_set_orientation (GTK_ORIENTABLE (flow), GTK_ORIENTATION_VERTICAL);
gtk_widget_set_halign (flow, GTK_ALIGN_START);
gtk_flow_box_set_selection_mode (GTK_FLOW_BOX (flow), GTK_SELECTION_BROWSE);
gtk_flow_box_select_child (GTK_FLOW_BOX (flow),
gtk_flow_box_get_child_at_index (GTK_FLOW_BOX (flow), 0));
g_signal_connect (flow, "child-activated",
G_CALLBACK (gs_details_page_screenshot_selected_cb),
self);
}
......
......@@ -52,10 +52,10 @@
<child>
<object class="GsFixedSizeBin" id="gs_fixed_bin">
<property name="visible">True</property>
<property name="preferred-width">860</property>
<property name="preferred-width">320</property>
<child>
<object class="GtkBox" id="box_details">
<property name="width_request">752</property>
<property name="width_request">300</property>
<property name="orientation">vertical</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
......@@ -63,7 +63,7 @@
<property name="valign">start</property>
<property name="margin_top">4</property>
<property name="margin_bottom">4</property>
<property name="border_width">24</property>
<property name="border_width">12</property>
<property name="spacing">18</property>
<property name="hexpand">False</property>
<child>
......@@ -381,6 +381,7 @@
<property name="can_focus">False</property>
<property name="margin_bottom">14</property>
<property name="spacing">9</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="box_details_screenshot_main">
<property name="visible">True</property>
......@@ -402,8 +403,8 @@
<property name="visible">True</property>
<property name="shadow_type">none</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">automatic</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">never</property>
<child>
<object class="GtkBox" id="box_details_screenshot_thumbnails">
<property name="visible">True</property>
......@@ -618,6 +619,7 @@
<property name="can_focus">False</property>
<property name="margin_bottom">26</property>
<property name="spacing">30</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkGrid" id="grid_details_kudo">
<property name="visible">True</property>
......
......@@ -193,7 +193,7 @@
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="textview_css">
<property name="width_request">400</property>
<property name="width_request">300</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="left_margin">12</property>
......
......@@ -33,7 +33,7 @@
<child>
<object class="GtkProgressBar" id="progressbar">
<property name="visible">True</property>
<property name="width_request">480</property>
<property name="width_request">300</property>
<property name="halign">center</property>
<property name="fraction">0.0</property>
<property name="margin_top">8</property>
......@@ -51,6 +51,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Starting up…</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<attributes>
<attribute name="scale" value="1.4"/>
</attributes>
......
......@@ -99,27 +99,30 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="voting_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes" comments="Translators: Users can express their opinions about other users&apos; opinions about the apps.">Was this review useful to you?</property>
<property name="wrap">True</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box_voting">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">9</property>
<property name="halign">start</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" comments="Translators: Users can express their opinions about other users&apos; opinions about the apps.">Was this review useful to you?</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<property name="orientation">start</property>
<child>
<object class="GtkBox" id="box_vote_buttons">
<property name="visible">True</property>
......@@ -181,7 +184,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="top_attach">4</property>
<property name="width">2</property>
</packing>
</child>
......@@ -224,7 +227,7 @@
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">3</property>
<property name="top_attach">4</property>
</packing>
</child>
</object>
......
......@@ -2010,6 +2010,10 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
g_signal_connect (priv->main_window, "delete-event",
G_CALLBACK (main_window_closed_cb), shell);
/* let the navigation bar take all the height, it doesn't work fro the UI file */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "title_box"));
gtk_widget_set_valign (widget, GTK_ALIGN_FILL);
/* fix up the header bar */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "header"));
if (gs_utils_is_current_desktop ("Unity")) {
......
......@@ -76,7 +76,7 @@
<child>
<object class="GtkProgressBar" id="progressbar">
<property name="visible">True</property>
<property name="width_request">400</property>
<property name="width_request">300</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="fraction">0.3</property>
......
......@@ -45,8 +45,13 @@
}
.toolbar-primary-buttons-software {
padding-left: 26px;
padding-right: 26px;
padding-left: 18px;
padding-right: 18px;
margin-top: 0px;
margin-bottom: 0px;
border-radius: 0px;
border-top-style: none;
border-bottom-style: none;
}
.round-button {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment