Guest User

window.ui

a guest
Oct 18th, 2025
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.83 KB | Source Code | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <interface>
  3.   <requires lib="gtk" version="4.0"/>
  4.   <requires lib="Adw" version="1.0"/>
  5.  
  6.   <template class="SportsWindow" parent="GtkApplicationWindow">
  7.     <property name="default-width">900</property>
  8.     <property name="default-height">600</property>
  9.     <property name="title" translatable="yes">Sports</property>
  10.  
  11.     <!-- Integrated header with menu -->
  12.     <child type="titlebar">
  13.       <object class="AdwHeaderBar">
  14.         <!-- Centered title -->
  15.         <child type="title">
  16.           <object class="AdwWindowTitle">
  17.             <property name="title" translatable="yes">Sports</property>
  18.           </object>
  19.         </child>
  20.  
  21.         <!-- Three-lines menu button -->
  22.         <child type="end">
  23.           <object class="GtkMenuButton">
  24.             <property name="icon-name">open-menu-symbolic</property>
  25.             <property name="tooltip-text" translatable="yes">Menu</property>
  26.             <property name="menu-model">primary_menu</property>
  27.           </object>
  28.         </child>
  29.       </object>
  30.     </child>
  31.  
  32.     <!-- Main content with sidebar -->
  33.     <property name="child">
  34.       <object class="AdwNavigationSplitView" id="split_view">
  35.         <property name="max-sidebar-width">220</property>
  36.  
  37.         <!-- Sidebar -->
  38.         <property name="sidebar">
  39.           <object class="GtkScrolledWindow">
  40.             <property name="vexpand">True</property>
  41.             <property name="hscrollbar-policy">never</property>
  42.  
  43.             <child>
  44.               <object class="GtkBox">
  45.                 <property name="orientation">vertical</property>
  46.                 <property name="spacing">12</property>
  47.                 <property name="margin-top">12</property>
  48.                 <property name="margin-bottom">12</property>
  49.                 <property name="margin-start">12</property>
  50.                 <property name="margin-end">12</property>
  51.  
  52.                 <!-- App name at the top, centered -->
  53.                 <child>
  54.                   <object class="GtkLabel">
  55.                     <property name="label">Sports</property>
  56.                     <property name="xalign">0.5</property>
  57.                     <attributes>
  58.                       <attribute name="weight" value="bold"/>
  59.                       <attribute name="scale" value="1.5"/>
  60.                     </attributes>
  61.                   </object>
  62.                 </child>
  63.  
  64.                 <!-- Competitions title -->
  65.                 <child>
  66.                   <object class="GtkLabel">
  67.                     <property name="label">Competitions</property>
  68.                     <property name="xalign">0.5</property>
  69.                     <attributes>
  70.                       <attribute name="weight" value="bold"/>
  71.                       <attribute name="scale" value="1.1"/>
  72.                     </attributes>
  73.                   </object>
  74.                 </child>
  75.  
  76.                 <!-- Serie A -->
  77.                 <child>
  78.                   <object class="AdwActionRow" id="row_serie_a">
  79.                     <property name="title">Serie A</property>
  80.                     <property name="activatable">True</property>
  81.                   </object>
  82.                 </child>
  83.  
  84.                 <!-- Bundesliga -->
  85.                 <child>
  86.                   <object class="AdwActionRow" id="row_bundesliga">
  87.                     <property name="title">Bundesliga</property>
  88.                     <property name="activatable">True</property>
  89.                   </object>
  90.                 </child>
  91.  
  92.               </object>
  93.             </child>
  94.           </object>
  95.         </property>
  96.  
  97.         <!-- Main area -->
  98.         <property name="content">
  99.           <object class="GtkBox">
  100.             <property name="orientation">vertical</property>
  101.             <property name="spacing">12</property>
  102.  
  103.             <child>
  104.               <object class="GtkLabel" id="label">
  105.                 <property name="label" translatable="yes">Select a competition from the sidebar</property>
  106.                 <property name="xalign">0.5</property>
  107.                 <style>
  108.                   <class name="title-1"/>
  109.                 </style>
  110.               </object>
  111.             </child>
  112.           </object>
  113.         </property>
  114.       </object>
  115.     </property>
  116.   </template>
  117.  
  118.   <!-- Main menu -->
  119.   <menu id="primary_menu">
  120.     <section>
  121.       <item>
  122.         <attribute name="label" translatable="yes">_Preferences</attribute>
  123.         <attribute name="action">app.preferences</attribute>
  124.       </item>
  125.       <item>
  126.         <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
  127.         <attribute name="action">app.shortcuts</attribute>
  128.       </item>
  129.       <item>
  130.         <attribute name="label" translatable="yes">_About Sports</attribute>
  131.         <attribute name="action">app.about</attribute>
  132.       </item>
  133.     </section>
  134.   </menu>
  135. </interface>
  136.  
Advertisement
Add Comment
Please, Sign In to add comment