Merge pull request #3500 from khaneliman/group
This commit is contained in:
		
						commit
						2131678f6b
					
				| 
						 | 
					@ -12,7 +12,7 @@ namespace waybar {
 | 
				
			||||||
class Group : public AModule {
 | 
					class Group : public AModule {
 | 
				
			||||||
 public:
 | 
					 public:
 | 
				
			||||||
  Group(const std::string &, const std::string &, const Json::Value &, bool);
 | 
					  Group(const std::string &, const std::string &, const Json::Value &, bool);
 | 
				
			||||||
  virtual ~Group() = default;
 | 
					  ~Group() override = default;
 | 
				
			||||||
  auto update() -> void override;
 | 
					  auto update() -> void override;
 | 
				
			||||||
  operator Gtk::Widget &() override;
 | 
					  operator Gtk::Widget &() override;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,7 +9,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace waybar {
 | 
					namespace waybar {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const Gtk::RevealerTransitionType getPreferredTransitionType(bool is_vertical) {
 | 
					Gtk::RevealerTransitionType getPreferredTransitionType(bool is_vertical) {
 | 
				
			||||||
  /* The transition direction of a drawer is not actually determined by the transition type,
 | 
					  /* The transition direction of a drawer is not actually determined by the transition type,
 | 
				
			||||||
   * but rather by the order of 'box' and 'revealer_box':
 | 
					   * but rather by the order of 'box' and 'revealer_box':
 | 
				
			||||||
   *   'REVEALER_TRANSITION_TYPE_SLIDE_LEFT' and 'REVEALER_TRANSITION_TYPE_SLIDE_RIGHT'
 | 
					   *   'REVEALER_TRANSITION_TYPE_SLIDE_LEFT' and 'REVEALER_TRANSITION_TYPE_SLIDE_RIGHT'
 | 
				
			||||||
| 
						 | 
					@ -102,7 +102,7 @@ bool Group::handleMouseEnter(GdkEventCrossing* const& e) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool Group::handleMouseLeave(GdkEventCrossing* const& e) {
 | 
					bool Group::handleMouseLeave(GdkEventCrossing* const& e) {
 | 
				
			||||||
  if (!click_to_reveal) {
 | 
					  if (!click_to_reveal && e->detail != GDK_NOTIFY_INFERIOR) {
 | 
				
			||||||
    hide_group();
 | 
					    hide_group();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return false;
 | 
					  return false;
 | 
				
			||||||
| 
						 | 
					@ -112,7 +112,7 @@ bool Group::handleToggle(GdkEventButton* const& e) {
 | 
				
			||||||
  if (!click_to_reveal || e->button != 1) {
 | 
					  if (!click_to_reveal || e->button != 1) {
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (box.get_state_flags() & Gtk::StateFlags::STATE_FLAG_PRELIGHT) {
 | 
					  if ((box.get_state_flags() & Gtk::StateFlags::STATE_FLAG_PRELIGHT) != 0U) {
 | 
				
			||||||
    hide_group();
 | 
					    hide_group();
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    show_group();
 | 
					    show_group();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -44,7 +44,7 @@ std::string waybar::CssReloadHelper::findPath(const std::string& filename) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // File monitor does not work with symlinks, so resolve them
 | 
					  // File monitor does not work with symlinks, so resolve them
 | 
				
			||||||
  std::string original = result;
 | 
					  std::string original = result;
 | 
				
			||||||
  while(std::filesystem::is_symlink(result)) {
 | 
					  while (std::filesystem::is_symlink(result)) {
 | 
				
			||||||
    result = std::filesystem::read_symlink(result);
 | 
					    result = std::filesystem::read_symlink(result);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // prevent infinite cycle
 | 
					    // prevent infinite cycle
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue