universal-access: Split cursor blinking dialog into its own widget

This commit is contained in:
Robert Ancell 2020-11-03 08:57:13 +13:00 committed by Georges Basile Stavracas Neto
parent 31102bd256
commit 2f4058d7e9
8 changed files with 242 additions and 162 deletions

View file

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<template class="CcCursorBlinkingDialog" parent="GtkDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Cursor Blinking</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="use_header_bar">1</property>
<child internal-child="headerbar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<child>
<object class="GtkSwitch" id="enable_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
</object>
</child>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Cursor blinks in text fields.</property>
<property name="margin_start">12</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">12</property>
</object>
</child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="margin_start">12</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">12</property>
<property name="orientation">vertical</property>
<property name="row_spacing">18</property>
<property name="column_spacing">24</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Speed</property>
<property name="mnemonic_widget">blink_time_scale</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkScale" id="blink_time_scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">blink_time_adjustment</property>
<property name="draw_value">False</property>
<property name="width-request">400</property>
<child internal-child="accessible">
<object class="AtkObject">
<property name="AtkObject::accessible-description" translatable="yes">Cursor blinking speed</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</template>
<object class="GtkAdjustment" id="blink_time_adjustment">
<property name="lower">100</property>
<property name="upper">2500</property>
<property name="value">1000</property>
<property name="step_increment">200</property>
<property name="page_increment">200</property>
</object>
</interface>