clang-format header sorting conf fix. Some spacing and order of
include/declaration changes.
This commit is contained in:
parent
299b39ad28
commit
5f341149fa
|
@ -34,14 +34,14 @@ EmptyLineBeforeAccessModifier: Always
|
|||
FixNamespaceComments: false
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
- Regex: '<[[:alnum:]._]+>'
|
||||
Priority: -10
|
||||
- Regex: '^<fontconfig'
|
||||
Priority: -5
|
||||
- Regex: '^<SDL'
|
||||
Priority: -5
|
||||
- Regex: '^<basic_widgets/'
|
||||
Priority: 0
|
||||
- Regex: '<[[:alnum:]._]+>'
|
||||
Priority: -10
|
||||
- Regex: '^".*"$'
|
||||
Priority: 5
|
||||
IndentCaseLabels: true
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
|
||||
#include <cmath>
|
||||
#include <functional>
|
||||
#include <SDL_pixels.h>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <SDL_pixels.h>
|
||||
|
||||
#include <basic_widgets/core/type/concepts.hpp>
|
||||
|
||||
namespace bwidgets
|
||||
|
|
|
@ -23,11 +23,6 @@ namespace bwidgets
|
|||
public virtual WidgetImpl
|
||||
{
|
||||
public:
|
||||
void color_fg(const Color c) override
|
||||
{
|
||||
_input_caption->font_color_fg(c);
|
||||
}
|
||||
|
||||
[[nodiscard]] auto input_text() const -> std::string_view override
|
||||
{
|
||||
return _input_caption->text();
|
||||
|
@ -38,6 +33,11 @@ namespace bwidgets
|
|||
_input_caption->text(std::move(txt));
|
||||
}
|
||||
|
||||
void input_text_color(const Color c) override
|
||||
{
|
||||
_input_caption->font_color_fg(c);
|
||||
}
|
||||
|
||||
[[nodiscard]] auto is_valid_input(const std::string_view) const noexcept
|
||||
-> bool override
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define BWIDGETS_EVENT_HANDLER_HPP
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include <SDL_events.h>
|
||||
|
||||
namespace bwidgets
|
||||
|
|
|
@ -56,6 +56,7 @@ void ButtonImpl::_handle_geometry_change(const SDL_Rect& vp)
|
|||
const auto txt_size = _caption->size();
|
||||
_caption_area = {center_line(vp.w, txt_size.w), center_line(vp.h, txt_size.h),
|
||||
txt_size.w, txt_size.h};
|
||||
|
||||
_caption->viewport(rect_offset(_caption_area, vp));
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ void CaptionImpl::render_mode(const Font::RenderMode m)
|
|||
auto CaptionImpl::size() const noexcept -> Size
|
||||
{
|
||||
if (!_font) return {0, 0};
|
||||
|
||||
const auto [w, h] = _font->text_size(_text);
|
||||
return {w + 2 * margins.w, h + 2 * margins.h};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue