fix: don't a warning for a width/height of 0

This commit is contained in:
Alex 2020-07-12 11:57:47 +02:00 committed by GitHub
parent 27f89bdcc3
commit e3fdd6d94a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ void waybar::Bar::onConfigure(GdkEventConfigure* ev) {
auto tmp_width = width_;
if (ev->height > static_cast<int>(height_)) {
// Default minimal value
if (height_ != 1) {
if (height_ > 1) {
spdlog::warn(MIN_HEIGHT_MSG, height_, ev->height);
}
if (config["height"].isUInt()) {
@ -132,7 +132,7 @@ void waybar::Bar::onConfigure(GdkEventConfigure* ev) {
}
if (ev->width > static_cast<int>(width_)) {
// Default minimal value
if (width_ != 1) {
if (width_ > 1) {
spdlog::warn(MIN_WIDTH_MSG, width_, ev->width);
}
if (config["width"].isUInt()) {