libsysprof-ui: add simplified time label

This handles the resizing of the numbers better to avoid jitter of the
positioning.
This commit is contained in:
Christian Hergert
2019-05-24 00:41:02 -07:00
parent 272a0e284e
commit bfe72c1d77
7 changed files with 200 additions and 33 deletions

View File

@ -20,17 +20,11 @@
</object>
</child>
<child>
<object class="GtkLabel" id="elapsed">
<property name="label" translatable="yes">00:00</property>
<object class="SysprofTimeLabel" id="elapsed">
<property name="visible">true</property>
<style>
<class name="dim-label"/>
</style>
<attributes>
<attribute name="scale" value="4"/>
<attribute name="weight" value="bold"/>
<attribute name="font-features" value="font-feature-settings: &apos;tnum&apos;"/>
</attributes>
</object>
</child>
<child>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<template class="SysprofTimeLabel" parent="GtkBox">
<property name="can_focus">False</property>
<property name="spacing">2</property>
<child type="center">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="minute">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">00</property>
<property name="width_chars">2</property>
<property name="xalign">1</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="second">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">00</property>
<property name="width_chars">2</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">4</property>
</packing>
</child>
</template>
</interface>