Redo controls popovers into GtkMenuButtons

This commit is contained in:
Rafał Dzięgiel
2021-09-01 14:25:42 +02:00
parent 04122d46a7
commit bbada8fb4e
10 changed files with 400 additions and 405 deletions

58
ui/elapsed-time-button.ui Normal file
View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="ClapperElapsedTimeButton" parent="ClapperPopoverButtonBase">
<property name="popover">popover</property>
<property name="direction">up</property>
<property name="valign">center</property>
<property name="halign">center</property>
<property name="can_focus">False</property>
<style>
<class name="flat"/>
</style>
</template>
<object class="GtkPopover" id="popover">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<object class="GtkScrolledWindow" id="scrolledWindow">
<property name="propagate_natural_width">False</property>
<property name="propagate_natural_height">True</property>
</object>
</child>
<child>
<object class="ClapperPopoverSeparator">
<property name="label" translatable="yes">Speed</property>
</object>
</child>
<child>
<object class="GtkScale" id="speedScale">
<property name="orientation">horizontal</property>
<property name="value_pos">bottom</property>
<property name="draw_value">False</property>
<property name="round_digits">2</property>
<property name="hexpand">True</property>
<property name="valign">center</property>
<property name="adjustment">speed_adjustment</property>
<marks>
<mark value="0.25" position="bottom">0.25x</mark>
<mark value="1" position="bottom" translatable="yes">Normal</mark>
<mark value="2" position="bottom">2x</mark>
</marks>
<style>
<class name="speedscale"/>
</style>
</object>
</child>
</object>
</child>
</object>
<object class="GtkAdjustment" id="speed_adjustment">
<property name="lower">0.01</property>
<property name="upper">2</property>
<property name="value">1</property>
<property name="page-increment">0.1</property>
</object>
</interface>