mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 15:16:25 +01:00
[Summary] Adding attributes for Gtk::Entry
This commit is contained in:
parent
310217b5a6
commit
bc79bd9286
1 changed files with 17 additions and 0 deletions
|
|
@ -705,6 +705,23 @@ WavesUI::set_attributes (Gtk::Widget& widget, const XMLNode& definition, const X
|
|||
}
|
||||
}
|
||||
|
||||
Gtk::Entry* entry = dynamic_cast<Gtk::Entry*> (&widget);
|
||||
if (entry) {
|
||||
property = xml_property (definition, "horzalignment", styles, "center");
|
||||
std::transform(property.begin(), property.end(), property.begin(), ::tolower);
|
||||
Gtk::AlignmentEnum xalign = Gtk::ALIGN_CENTER;
|
||||
if (property == "start") {
|
||||
xalign = Gtk::ALIGN_START;
|
||||
} else if (property == "end") {
|
||||
xalign = Gtk::ALIGN_END;
|
||||
} else if (property == "center") {
|
||||
xalign = Gtk::ALIGN_CENTER;
|
||||
} else {
|
||||
dbg_msg ("Invalid horizontal alignment for Gtk::Entry !");
|
||||
}
|
||||
entry->set_alignment (xalign);
|
||||
}
|
||||
|
||||
Gtk::Label* label = dynamic_cast<Gtk::Label*> (&widget);
|
||||
if (label) {
|
||||
property = xml_property (definition, "justify", styles, "left");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue