2018-08-18 09:43:48 +00:00
|
|
|
#include "ALabel.hpp"
|
|
|
|
|
2018-08-20 12:50:45 +00:00
|
|
|
waybar::ALabel::ALabel(const Json::Value& config)
|
|
|
|
: config_(config)
|
2018-08-18 09:43:48 +00:00
|
|
|
{
|
|
|
|
if (config_["max-length"]) {
|
|
|
|
label_.set_max_width_chars(config_["max-length"].asUInt());
|
|
|
|
label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
auto waybar::ALabel::update() -> void
|
|
|
|
{
|
|
|
|
// Nothing here
|
|
|
|
}
|
|
|
|
|
|
|
|
waybar::ALabel::operator Gtk::Widget &() {
|
|
|
|
return label_;
|
|
|
|
}
|