rename fixed-length to min-length
parent
8c70513a24
commit
c8d7b6fa92
|
@ -20,7 +20,7 @@ ALabel::ALabel(const Json::Value& config, const std::string& name, const std::st
|
||||||
}
|
}
|
||||||
event_box_.add(label_);
|
event_box_.add(label_);
|
||||||
if (config_["max-length"].isUInt()) {
|
if (config_["max-length"].isUInt()) {
|
||||||
label_.set_max_width_chars(config_["max-length"].asUInt());
|
label_.set_max_width_chars(config_["max-length"].asInt());
|
||||||
label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END);
|
label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END);
|
||||||
label_.set_single_line_mode(true);
|
label_.set_single_line_mode(true);
|
||||||
} else if (ellipsize && label_.get_max_width_chars() == -1) {
|
} else if (ellipsize && label_.get_max_width_chars() == -1) {
|
||||||
|
@ -28,8 +28,8 @@ ALabel::ALabel(const Json::Value& config, const std::string& name, const std::st
|
||||||
label_.set_single_line_mode(true);
|
label_.set_single_line_mode(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_["fixed-length"].isUInt()) {
|
if (config_["min-length"].isUInt()) {
|
||||||
label_.set_width_chars(config_["fixed-length"].asUInt());
|
label_.set_width_chars(config_["min-length"].asUInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config_["align"].isDouble()) {
|
if (config_["align"].isDouble()) {
|
||||||
|
|
Loading…
Reference in New Issue