mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-20 04:54:25 -04:00
Add new window to allow convenient display and globally change used color intensities for design and testing purposes. Changes were introduced to Renderer as well as GUI service to allow global change of used color scheme. When using list, screen is deep refreshed each time the color is changed. Known issues: Item focus borders (top,bottom) with changed black intensity may not render properly, however it doesn't obscure the target functionality.
29 lines
639 B
C++
29 lines
639 B
C++
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "Color.hpp"
|
|
#include "Common.hpp"
|
|
|
|
#include <memory>
|
|
|
|
namespace gui
|
|
{
|
|
class Context;
|
|
} // namespace gui
|
|
|
|
namespace gui::renderer
|
|
{
|
|
class PixelRenderer
|
|
{
|
|
|
|
public:
|
|
PixelRenderer() = delete;
|
|
|
|
static void draw(Context *ctx, Point point, Color color);
|
|
static void updateColorScheme(const std::unique_ptr<ColorScheme> &scheme);
|
|
[[nodiscard]] static auto getColor(const uint8_t intensity) -> uint8_t;
|
|
};
|
|
} // namespace gui::renderer
|