[controller] set_color as integers + bugui update

This commit is contained in:
thibaud keller 2024-11-28 23:33:24 +00:00
parent e8a804d0be
commit 01f6edc127
3 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit da8232c87e993f97e7cfc9efb23f87d0d32e0e8c Subproject commit c71a9c1e02e3364a16edf3664ca6ef40898b9635

View file

@ -109,19 +109,19 @@ void Controller::setup_scenario(Scenario::ProcessModel* s)
[this] { update(); }); [this] { update(); });
} }
void Controller::on_interval_changed(const Scenario::IntervalModel &) void Controller::on_interval_changed(const Scenario::IntervalModel&)
{ {
update(); update();
} }
void Controller::paint(bugui::painter &painter) void Controller::paint(bugui::painter& painter)
{ {
if (!scenar) return; if (!scenar) return;
// Copied from MiniscenarioView // Copied from MiniscenarioView
auto& skin = Process::Style::instance(); auto& skin = Process::Style::instance();
const auto col = skin.IntervalBase().color(); const auto col = skin.IntervalBase().color();
painter.set_color(col.redF(), col.greenF(), col.blackF(), col.alphaF()); painter.set_color(col.red(), col.green(), col.black(), col.alpha());
for(const Scenario::IntervalModel& c : scenar->intervals) for(const Scenario::IntervalModel& c : scenar->intervals)
{ {

View file

@ -24,7 +24,7 @@ public:
private: private:
Scenario::ProcessModel* scenar; Scenario::ProcessModel* scenar;
void on_interval_changed(const Scenario::IntervalModel &); void on_interval_changed(const Scenario::IntervalModel&);
}; };
} }