Ported away from deprecated Gtk::Label methods.

This commit is contained in:
Alexander Shaduri
2022-01-24 13:00:21 +04:00
parent 1614106510
commit 38f9928756
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -112,7 +112,7 @@ bool gui_show_text_entry_dialog(const std::string& title, const std::string& mes
+ (sec_message.empty() ? "\n" : "") + "</b></big>");
main_label.set_line_wrap(true);
main_label.set_selectable(true);
main_label.set_alignment(Gtk::ALIGN_START);
main_label.set_halign(Gtk::ALIGN_START);
Gtk::Label sec_label;
if (sec_msg_markup) {
@@ -122,7 +122,7 @@ bool gui_show_text_entry_dialog(const std::string& title, const std::string& mes
}
sec_label.set_line_wrap(true);
sec_label.set_selectable(true);
sec_label.set_alignment(Gtk::ALIGN_START);
sec_label.set_halign(Gtk::ALIGN_START);
Gtk::Entry input_entry;
input_entry.set_activates_default(true);
+3 -3
View File
@@ -86,7 +86,7 @@ namespace {
Gtk::Label* label = Gtk::manage(new Gtk::Label());
label->set_markup(label_text);
label->set_padding(6, 0);
label->set_alignment(Gtk::ALIGN_START);
label->set_halign(Gtk::ALIGN_START);
// label->set_ellipsize(Pango::ELLIPSIZE_END);
label->set_selectable(true);
label->set_can_focus(false);
@@ -917,7 +917,7 @@ void GscInfoWindow::fill_ui_general(const std::vector<AtaStorageProperty>& props
Gtk::Label* name = Gtk::manage(new Gtk::Label());
// name->set_ellipsize(Pango::ELLIPSIZE_END);
name->set_alignment(Gtk::ALIGN_END); // right-align
name->set_halign(Gtk::ALIGN_END); // right-align
name->set_selectable(true);
name->set_can_focus(false);
name->set_markup("<b>" + Glib::Markup::escape_text(p.displayable_name) + "</b>");
@@ -927,7 +927,7 @@ void GscInfoWindow::fill_ui_general(const std::vector<AtaStorageProperty>& props
// then it stops being right-aligned.
Gtk::Label* value = Gtk::manage(new Gtk::Label());
// value->set_ellipsize(Pango::ELLIPSIZE_END);
value->set_alignment(Gtk::ALIGN_START); // left-align
value->set_halign(Gtk::ALIGN_START); // left-align
value->set_selectable(true);
value->set_can_focus(false);
value->set_markup(Glib::Markup::escape_text(p.format_value()));