Fix clang-format
This commit is contained in:
+15
-16
@@ -15,7 +15,7 @@ enum class GraphType { LINE, BAR, GAUGE };
|
||||
|
||||
class AGraph : public AModule {
|
||||
public:
|
||||
AGraph(const Json::Value &, const std::string &, const std::string &, uint16_t interval = 0,
|
||||
AGraph(const Json::Value&, const std::string&, const std::string&, uint16_t interval = 0,
|
||||
bool enable_click = false, bool enable_scroll = false);
|
||||
virtual ~AGraph() = default;
|
||||
auto update() -> void override;
|
||||
@@ -30,29 +30,28 @@ class AGraph : public AModule {
|
||||
|
||||
const std::chrono::seconds interval_;
|
||||
|
||||
bool onDraw(const Cairo::RefPtr<Cairo::Context> &cr);
|
||||
bool onDraw(const Cairo::RefPtr<Cairo::Context>& cr);
|
||||
|
||||
std::map<std::string, GtkMenuItem *> submenus_;
|
||||
std::map<std::string, GtkMenuItem*> submenus_;
|
||||
std::map<std::string, std::string> menuActionsMap_;
|
||||
static void handleGtkMenuEvent(GtkMenuItem *menuitem, gpointer data);
|
||||
static void handleGtkMenuEvent(GtkMenuItem* menuitem, gpointer data);
|
||||
|
||||
private:
|
||||
void drawFilledArea(const Cairo::RefPtr<Cairo::Context> &cr,
|
||||
const std::vector<std::pair<double, double>> &points, double height,
|
||||
const Gdk::RGBA &bg_color);
|
||||
void drawFilledArea(const Cairo::RefPtr<Cairo::Context>& cr,
|
||||
const std::vector<std::pair<double, double>>& points, double height,
|
||||
const Gdk::RGBA& bg_color);
|
||||
|
||||
void drawLine(const Cairo::RefPtr<Cairo::Context> &cr,
|
||||
const std::vector<std::pair<double, double>> &points, const Gdk::RGBA &fg_color);
|
||||
void drawLine(const Cairo::RefPtr<Cairo::Context>& cr,
|
||||
const std::vector<std::pair<double, double>>& points, const Gdk::RGBA& fg_color);
|
||||
|
||||
void drawPath(const Cairo::RefPtr<Cairo::Context> &cr,
|
||||
const std::vector<std::pair<double, double>> &points);
|
||||
void drawPath(const Cairo::RefPtr<Cairo::Context>& cr,
|
||||
const std::vector<std::pair<double, double>>& points);
|
||||
|
||||
void drawBars(const Cairo::RefPtr<Cairo::Context> &cr,
|
||||
double width, double height, int current_value,
|
||||
const Gdk::RGBA &fg_color);
|
||||
void drawBars(const Cairo::RefPtr<Cairo::Context>& cr, double width, double height,
|
||||
int current_value, const Gdk::RGBA& fg_color);
|
||||
|
||||
void drawGauge(const Cairo::RefPtr<Cairo::Context> &cr, double width, double height,
|
||||
int current_value, const Gdk::RGBA &fg_color);
|
||||
void drawGauge(const Cairo::RefPtr<Cairo::Context>& cr, double width, double height,
|
||||
int current_value, const Gdk::RGBA& fg_color);
|
||||
};
|
||||
|
||||
} // namespace waybar
|
||||
|
||||
@@ -21,9 +21,9 @@ class CpuGraph : public AGraph {
|
||||
auto update() -> void override;
|
||||
|
||||
private:
|
||||
static constexpr const char *MODERATE_CLASS = "cpu-moderate";
|
||||
static constexpr const char *HIGH_CLASS = "cpu-high";
|
||||
static constexpr const char *INTENSIVE_CLASS = "cpu-intensive";
|
||||
static constexpr const char* MODERATE_CLASS = "cpu-moderate";
|
||||
static constexpr const char* HIGH_CLASS = "cpu-high";
|
||||
static constexpr const char* INTENSIVE_CLASS = "cpu-intensive";
|
||||
|
||||
std::vector<std::tuple<size_t, size_t>> prev_times_;
|
||||
util::SleeperThread thread_;
|
||||
|
||||
Reference in New Issue
Block a user