gnome-control-center/panels/network/network-wifi.ui
iampkumar02 27d5e7dd26 wifi: Center panel title when subtitle isn't visible
We used to have a custom title widget containing a label for the
title and another for the subtitle (status). When the subtitle label
wasn't visible, the title label wouldn't get centered vertically in
the headerbar.

By porting the custom title widget to AdwWindowTitle we get the title
centered for free.

Fixes #1891
2023-04-11 13:49:09 +02:00

136 lines
4.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<template class="NetDeviceWifi" parent="AdwBin">
<child>
<object class="GtkStack" id="stack">
<property name="valign">start</property>
<property name="vhomogeneous">False</property>
<child>
<object class="GtkStackPage">
<property name="child">
<object class="GtkBox" id="listbox_box">
<property name="orientation">vertical</property>
<property name="height-request">140</property>
</object>
</property>
</object>
</child>
<!-- Wi-Fi Hotspot details -->
<child>
<object class="GtkStackPage">
<property name="child">
<object class="GtkListBox" id="hotspot_box">
<property name="selection-mode">none</property>
<style>
<class name="boxed-list" />
</style>
<child>
<object class="CcListRow" id="hotspot_name_row">
<property name="activatable">False</property>
<property name="title" context="Wi-Fi Hotspot" translatable="yes">Network Name</property>
</object>
</child>
<child>
<object class="CcListRow" id="hotspot_security_row">
<property name="activatable">False</property>
<property name="title" context="Wi-Fi Hotspot" translatable="yes">Security type</property>
</object>
</child>
<child>
<object class="CcListRow" id="hotspot_password_row">
<property name="activatable">False</property>
<property name="title" context="Wi-Fi Hotspot" translatable="yes">Password</property>
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</child>
</template>
<!-- Center widget -->
<object class="AdwWindowTitle" id="wifi_headerbar_title">
<property name="title" translatable="yes">Wi-Fi</property>
</object>
<!-- Box with the On/Off switch + menu button -->
<object class="GtkBox" id="header_box">
<property name="spacing">6</property>
<property name="halign">end</property>
<child>
<object class="GtkSwitch" id="device_off_switch">
<property name="valign">center</property>
<signal name="notify::active" handler="device_off_switch_changed_cb" object="NetDeviceWifi" swapped="yes"/>
<accessibility>
<property name="label" translatable="yes">Turn Wi-Fi off</property>
</accessibility>
</object>
</child>
<child>
<object class="GtkMenuButton" id="header_button">
<property name="popover">header_button_popover</property>
<property name="icon_name">view-more-symbolic</property>
<accessibility>
<property name="label" translatable="yes">More options…</property>
</accessibility>
</object>
</child>
</object>
<!-- Menu Popover -->
<object class="GtkPopover" id="header_button_popover">
<style>
<class name="menu" />
</style>
<child>
<object class="GtkListBox">
<property name="selection_mode">none</property>
<signal name="row_activated" handler="on_popover_row_activated_cb" />
<child>
<object class="GtkListBoxRow" id="connect_hidden_row">
<property name="activatable">True</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">_Connect to Hidden Network…</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="start_hotspot_row">
<property name="activatable">True</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">_Turn On Wi-Fi Hotspot…</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="activatable">True</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">_Saved Networks</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>