gtk2/gtk/resources/ui/gtkscalebutton.ui
Matthias Clasen c46b1c2a05 GtkScaleButton: Use a popover
This works better than the contortions we're currently doing
with an undecorated dialog, and grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=723181
2014-02-03 15:43:24 -05:00

110 lines
4.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk30">
<!-- interface-requires gtk+ 3.10 -->
<!-- interface-requires gtkprivate 3.10 -->
<template class="GtkScaleButton" parent="GtkButton">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<child>
<object class="GtkImage" id="image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">image-missing</property>
</object>
</child>
</template>
<object class="GtkAdjustment" id="adjustment">
<property name="upper">100</property>
<property name="step_increment">2</property>
<property name="page_increment">20</property>
</object>
<object class="GtkPopover" id="dock">
<signal name="map" handler="cb_popup_mapped" swapped="no"/>
<child>
<object class="GtkBox" id="box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="margin">4</property>
<property name="spacing">4</property>
<child>
<object class="GtkButton" id="plus_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="halign">center</property>
<property name="valign">center</property>
<style>
<class name="image-button"/>
</style>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon-name">list-add-symbolic</property>
<property name="icon-size">0</property>
</object>
</child>
<signal name="button-press-event" handler="cb_button_press" swapped="no"/>
<signal name="button-release-event" handler="cb_button_release" swapped="no"/>
<signal name="clicked" handler="cb_button_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScale" id="scale">
<property name="height_request">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="orientation">vertical</property>
<property name="adjustment">adjustment</property>
<property name="inverted">True</property>
<property name="round_digits">1</property>
<property name="draw_value">False</property>
<signal name="value-changed" handler="cb_scale_value_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="minus_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="halign">center</property>
<property name="valign">center</property>
<style>
<class name="image-button"/>
</style>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon-name">list-remove-symbolic</property>
<property name="icon-size">0</property>
</object>
</child>
<signal name="button-press-event" handler="cb_button_press" swapped="no"/>
<signal name="button-release-event" handler="cb_button_release" swapped="no"/>
<signal name="clicked" handler="cb_button_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</interface>