Skip to content

Commit

Permalink
Use xalign now that we have control over the value label.
Browse files Browse the repository at this point in the history
  • Loading branch information
saivert committed Jul 1, 2024
1 parent e0cd484 commit 3c014e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions data/resources/ui/volumescale.ui
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<child>
<object class="GtkLabel" id="value">
<property name="width-chars">15</property>
<property name="xalign">1</property>
</object>
</child>
</template>
Expand Down
5 changes: 1 addition & 4 deletions src/ui/volumescale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ mod imp {

let cubic_volume = volume.cbrt();

let value_string = format!(
"{:>16}",
format!("{:.0}% ({:.2} dB)", cubic_volume * 100.0, (cubic_volume.powi(3)).log10() * 20.0)
);
let value_string = format!("{:.0}% ({:.2} dB)", cubic_volume * 100.0, (cubic_volume.powi(3)).log10() * 20.0);

self.value.set_label(&value_string);
}
Expand Down

0 comments on commit 3c014e3

Please sign in to comment.