Skip to content

Commit

Permalink
Fix text wrapping in ringing alarm page
Browse files Browse the repository at this point in the history
This fixes an issue where the application would get resized beyond the
screen boundaries despite being explicitly told to tile if the name of
an alarm was too long to fit on the screen.
  • Loading branch information
chrisduerr committed Oct 15, 2023
1 parent 28d0ce8 commit 7442c24
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gtk/src/ringing_alarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::time::Duration as StdDuration;
use alarm::audio::AlarmSound;
use alarm::Alarms;
use gtk4::glib::MainContext;
use gtk4::pango::WrapMode;
use gtk4::prelude::*;
use gtk4::{Align, Button, Label, Orientation};
use rezz::Alarm;
Expand Down Expand Up @@ -39,6 +40,8 @@ impl RingingAlarmPage {
// Add label for alarm name.
let name_label = Label::new(None);
name_label.add_css_class("ringing-name");
name_label.set_wrap(true);
name_label.set_wrap_mode(WrapMode::WordChar);
label_box.append(&name_label);

// Add label for alarm time.
Expand Down

0 comments on commit 7442c24

Please sign in to comment.