[Gtk] layout
原创
©著作权归作者所有:来自51CTO博客作者obentul的原创作品,请联系作者获取转载授权,否则将追究法律责任
MediaPlayer
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkWindow" id="main_window">
<property name="title">GTK Video Player</property>
<property name="default-width">1200</property>
<property name="default-height">600</property>
<child>
<object class="GtkBox" id="main_hbox">
<property name="orientation">horizontal</property>
<property name="spacing">5</property>
<!-- Left Sidebar with scrollable content -->
<child>
<object class="GtkScrolledWindow" id="scrolled_sidebar">
<property name="width-request">150</property>
<property name="hscrollbar-policy">never</property>
<property name="vscrollbar-policy">automatic</property>
<child>
<object class="GtkViewport">
<child>
<object class="GtkBox" id="sidebar">
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<!-- Add 10 Buttons to the sidebar -->
<child>
<object class="GtkButton" id="Start">
<property name="label">Start</property>
</object>
</child>
<child>
<object class="GtkButton" id="Pause">
<property name="label">Pause</property>
</object>
</child>
<child>
<object class="GtkButton" id="Stop">
<property name="label">Stop</property>
</object>
</child>
<child>
<object class="GtkButton" id="button_4">
<property name="label">Button 4</property>
</object>
</child>
<child>
<object class="GtkButton" id="button_5">
<property name="label">Button 5</property>
</object>
</child>
<child>
<object class="GtkButton" id="button_6">
<property name="label">Button 6</property>
</object>
</child>
<child>
<object class="GtkButton" id="button_7">
<property name="label">Button 7</property>
</object>
</child>
<child>
<object class="GtkButton" id="button_8">
<property name="label">Button 8</property>
</object>
</child>
<child>
<object class="GtkButton" id="button_9">
<property name="label">Button 9</property>
</object>
</child>
<child>
<object class="GtkButton" id="button_10">
<property name="label">Button 10</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- Separator between sidebar and drawing area -->
<child>
<object class="GtkSeparator" id="separator">
<property name="orientation">vertical</property>
</object>
</child>
<!-- Center Video Area -->
<child>
<object class="GtkDrawingArea" id="video_area">
<property name="hexpand">true</property>
<property name="vexpand">true</property>
</object>
</child>
</object>
</child>
</object>
</interface>