add clock to bar
This commit is contained in:
19
include/bar.hpp
Normal file
19
include/bar.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk4-layer-shell/gtk4-layer-shell.h>
|
||||
|
||||
#include "widgets/clock.hpp"
|
||||
|
||||
|
||||
class Bar : public Gtk::Window {
|
||||
public:
|
||||
Bar();
|
||||
|
||||
protected:
|
||||
Clock clock;
|
||||
Gtk::CenterBox main_box{};
|
||||
|
||||
void setup_ui();
|
||||
void load_css();
|
||||
};
|
||||
5
include/interface/updateable.ipp
Normal file
5
include/interface/updateable.ipp
Normal file
@@ -0,0 +1,5 @@
|
||||
class IUpdatable {
|
||||
public:
|
||||
virtual ~IUpdatable() = default;
|
||||
virtual bool onUpdate() = 0;
|
||||
};
|
||||
12
include/widgets/clock.hpp
Normal file
12
include/widgets/clock.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm/label.h>
|
||||
#include <gtkmm.h>
|
||||
#include <gtk4-layer-shell/gtk4-layer-shell.h>
|
||||
|
||||
#include "interface/updateable.ipp"
|
||||
|
||||
class Clock : public Gtk::Label, public IUpdatable {
|
||||
public:
|
||||
bool onUpdate();
|
||||
};
|
||||
Reference in New Issue
Block a user