mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
layout: improve the layout on small screens
Pack the info view info a scrolled window. Use an extra paned to allow resizing the video pane. Minimize padding on paned widgets.
This commit is contained in:
parent
95fc870193
commit
ab4afec78b
2 changed files with 10 additions and 5 deletions
|
@ -44,6 +44,7 @@ public class MediaInfo.App : Window
|
||||||
vbox.pack_start (create_menu(), false, false, 0);
|
vbox.pack_start (create_menu(), false, false, 0);
|
||||||
|
|
||||||
HPaned paned = new HPaned ();
|
HPaned paned = new HPaned ();
|
||||||
|
paned.set_border_width (0);
|
||||||
vbox.pack_start (paned, true, true, 3);
|
vbox.pack_start (paned, true, true, 3);
|
||||||
|
|
||||||
// add a file-chooser with info pane as preview widget
|
// add a file-chooser with info pane as preview widget
|
||||||
|
|
|
@ -34,7 +34,7 @@ sudo cp gstreamer-pbutils-0.10.vapi /usr/share/vala/mediainfo/vapi/
|
||||||
sudo cp gstreamer-pbutils-0.10.vapi /usr/share/vala-0.10/vapi/
|
sudo cp gstreamer-pbutils-0.10.vapi /usr/share/vala-0.10/vapi/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MediaInfo.Info : VBox
|
public class MediaInfo.Info : VPaned
|
||||||
{
|
{
|
||||||
// ui components
|
// ui components
|
||||||
private Label container_name;
|
private Label container_name;
|
||||||
|
@ -61,7 +61,7 @@ public class MediaInfo.Info : VBox
|
||||||
uint row = 0;
|
uint row = 0;
|
||||||
|
|
||||||
// configure the view
|
// configure the view
|
||||||
set_homogeneous (false);
|
set_border_width (0);
|
||||||
|
|
||||||
// setup lookup tables
|
// setup lookup tables
|
||||||
// video resolutions: http://upload.wikimedia.org/wikipedia/mediainfo/commons/e/e5/Vector_Video_Standards2.svg
|
// video resolutions: http://upload.wikimedia.org/wikipedia/mediainfo/commons/e/e5/Vector_Video_Standards2.svg
|
||||||
|
@ -103,14 +103,18 @@ public class MediaInfo.Info : VBox
|
||||||
// add widgets
|
// add widgets
|
||||||
// FIXME: handle aspect ratio (AspectFrame.ratio)
|
// FIXME: handle aspect ratio (AspectFrame.ratio)
|
||||||
drawing_area = new DrawingArea ();
|
drawing_area = new DrawingArea ();
|
||||||
drawing_area.set_size_request (300, 150);
|
drawing_area.set_size_request (160, 120);
|
||||||
drawing_area.expose_event.connect (on_drawing_area_expose);
|
drawing_area.expose_event.connect (on_drawing_area_expose);
|
||||||
drawing_area.realize.connect (on_drawing_area_realize);
|
drawing_area.realize.connect (on_drawing_area_realize);
|
||||||
drawing_area.unrealize.connect (on_drawing_area_unrealize);
|
drawing_area.unrealize.connect (on_drawing_area_unrealize);
|
||||||
pack_start (drawing_area, true, true, 0);
|
pack1 (drawing_area, true, true);
|
||||||
|
|
||||||
|
ScrolledWindow sw = new ScrolledWindow (null, null);
|
||||||
|
sw.set_policy (PolicyType.NEVER, PolicyType.ALWAYS);
|
||||||
|
pack2 (sw, true, true);
|
||||||
|
|
||||||
table = new Table (8, 3, false);
|
table = new Table (8, 3, false);
|
||||||
pack_start (table, false, false, 0);
|
sw.add_with_viewport (table);
|
||||||
|
|
||||||
label = new Label (null);
|
label = new Label (null);
|
||||||
label.set_markup("<b>Container</b>");
|
label.set_markup("<b>Container</b>");
|
||||||
|
|
Loading…
Reference in a new issue