mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #1738 from pinselimo/fix-button-padding
This commit is contained in:
commit
aa8bd51952
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <glibmm/markup.h>
|
#include <glibmm/markup.h>
|
||||||
#include <gtkmm/button.h>
|
#include <gtkmm/button.h>
|
||||||
|
#include <gtkmm/cssprovider.h>
|
||||||
#include <gtkmm/label.h>
|
#include <gtkmm/label.h>
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
|
|
||||||
|
@ -40,8 +40,6 @@ button {
|
|||||||
/* Avoid rounded borders under each button name */
|
/* Avoid rounded borders under each button name */
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
/* https://github.com/Alexays/Waybar/issues/1731 */
|
|
||||||
min-width: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
|
@ -18,6 +18,12 @@ AButton::AButton(const Json::Value& config, const std::string& name, const std::
|
|||||||
default_format_(format_) {
|
default_format_(format_) {
|
||||||
button_.set_name(name);
|
button_.set_name(name);
|
||||||
button_.set_relief(Gtk::RELIEF_NONE);
|
button_.set_relief(Gtk::RELIEF_NONE);
|
||||||
|
|
||||||
|
/* https://github.com/Alexays/Waybar/issues/1731 */
|
||||||
|
auto css = Gtk::CssProvider::create();
|
||||||
|
css->load_from_data("button { min-width: 0; }");
|
||||||
|
button_.get_style_context()->add_provider(css, GTK_STYLE_PROVIDER_PRIORITY_USER);
|
||||||
|
|
||||||
if (!id.empty()) {
|
if (!id.empty()) {
|
||||||
button_.get_style_context()->add_class(id);
|
button_.get_style_context()->add_class(id);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user