Fix #54
This commit is contained in:
parent
9d4048983d
commit
4b68840212
|
@ -3,6 +3,7 @@
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
font-family: Roboto, Helvetica, Arial, sans-serif;
|
font-family: Roboto, Helvetica, Arial, sans-serif;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
min-height: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
|
@ -98,4 +99,4 @@ window#waybar {
|
||||||
|
|
||||||
#tray {
|
#tray {
|
||||||
background-color: #2980b9;
|
background-color: #2980b9;
|
||||||
}
|
}
|
||||||
|
|
11
src/bar.cpp
11
src/bar.cpp
|
@ -105,11 +105,18 @@ void waybar::Bar::layerSurfaceHandleConfigure(void* data,
|
||||||
if (width != o->width_ || height != o->height_) {
|
if (width != o->width_ || height != o->height_) {
|
||||||
o->width_ = width;
|
o->width_ = width;
|
||||||
o->height_ = height;
|
o->height_ = height;
|
||||||
|
o->window.set_size_request(o->width_, o->height_);
|
||||||
|
o->window.resize(o->width_, o->height_);
|
||||||
|
|
||||||
|
int dummy_width, min_height;
|
||||||
|
o->window.get_size(dummy_width, min_height);
|
||||||
|
if (o->height_ < min_height) {
|
||||||
|
o->height_ = min_height;
|
||||||
|
}
|
||||||
std::cout << fmt::format(
|
std::cout << fmt::format(
|
||||||
"Bar configured (width: {}, height: {}) for output: {}",
|
"Bar configured (width: {}, height: {}) for output: {}",
|
||||||
o->width_, o->height_, o->output_name) << std::endl;
|
o->width_, o->height_, o->output_name) << std::endl;
|
||||||
o->window.set_size_request(o->width_, o->height_);
|
|
||||||
o->window.resize(o->width_, o->height_);
|
|
||||||
zwlr_layer_surface_v1_set_exclusive_zone(surface, o->height_);
|
zwlr_layer_surface_v1_set_exclusive_zone(surface, o->height_);
|
||||||
zwlr_layer_surface_v1_set_size(surface, o->width_, o->height_);
|
zwlr_layer_surface_v1_set_size(surface, o->width_, o->height_);
|
||||||
wl_surface_commit(o->surface);
|
wl_surface_commit(o->surface);
|
||||||
|
|
Loading…
Reference in New Issue