mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
Execute clang tidy and IWYU (#528)
This commit is contained in:

committed by
ArthurSonzogni

parent
4dc1a9fff9
commit
0542227ba7
@@ -1,6 +1,7 @@
|
||||
#include <algorithm> // for max, min
|
||||
#include <ftxui/component/component_options.hpp> // for SliderOption
|
||||
#include <string> // for allocator
|
||||
#include <utility> // for move
|
||||
|
||||
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
|
||||
#include "ftxui/component/component.hpp" // for Make, Slider
|
||||
@@ -12,7 +13,7 @@
|
||||
#include "ftxui/screen/box.hpp" // for Box
|
||||
#include "ftxui/screen/color.hpp" // for Color, Color::GrayDark, Color::White
|
||||
#include "ftxui/screen/util.hpp" // for clamp
|
||||
#include "ftxui/util/ref.hpp" // for ConstRef, ConstStringRef, Ref
|
||||
#include "ftxui/util/ref.hpp" // for ConstRef, Ref, ConstStringRef
|
||||
|
||||
namespace ftxui {
|
||||
|
||||
@@ -43,7 +44,7 @@ class SliderBase : public ComponentBase {
|
||||
Element Render() override {
|
||||
auto gauge_color = Focused() ? color(options_->color_active)
|
||||
: color(options_->color_inactive);
|
||||
float percent = float(value_() - min_()) / float(max_() - min_());
|
||||
const float percent = float(value_() - min_()) / float(max_() - min_());
|
||||
return gaugeDirection(percent, options_->direction) |
|
||||
flexDirection(options_->direction) | reflect(gauge_box_) |
|
||||
gauge_color;
|
||||
|
Reference in New Issue
Block a user