Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Jan 9, 2025
1 parent 68b2ca1 commit f7b1085
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace color_picker_example {
test_zone.paint += [&](object& sender, paint_event_args& e) {
e.graphics().fill_rectangle(hatch_brush {hatch_style::wide_checker_board, color::from_argb(0x66, 0x66, 0x66), color::from_argb(0x99, 0x99, 0x99)}, e.clip_rectangle());
e.graphics().fill_rectangle(solid_brush {color_picker.color()}, e.clip_rectangle());
control_paint::draw_border(test_zone, e.graphics(), test_zone.border_style(), test_zone.border_sides(), application::style_sheet().system_colors().control_text(), e.clip_rectangle());
control_paint::draw_border(test_zone, e.graphics(), test_zone.border_style(), test_zone.border_sides(), application::style_sheet().system_colors().control_text(), rectangle::add(e.clip_rectangle(), -1, -1));
};

color_label.parent(*this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class form1 : public form {
test_zone.paint += [&](object& sender, paint_event_args& e) {
e.graphics().fill_rectangle(hatch_brush {hatch_style::wide_checker_board, color::from_argb(0x66, 0x66, 0x66), color::from_argb(0x99, 0x99, 0x99)}, e.clip_rectangle());
e.graphics().fill_rectangle(solid_brush {selected_color}, e.clip_rectangle());
control_paint::draw_border(test_zone, e.graphics(), test_zone.border_style(), test_zone.border_sides(), application::style_sheet().system_colors().control_text(), e.clip_rectangle());
control_paint::draw_border(test_zone, e.graphics(), test_zone.border_style(), test_zone.border_sides(), application::style_sheet().system_colors().control_text(), rectangle::add(e.clip_rectangle(), -1, -1));
};

color_label.auto_size(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace colors_example {
auto index = selected_index();
selected_index(npos);
colors_.clear();
auto colors = std::any_cast<const xtd::collections::generic::list<xtd::drawing::color>&(*)() noexcept>(colors_choice_.selected_item().tag());
auto colors = std::any_cast<const std::vector<xtd::drawing::color>&(*)() noexcept>(colors_choice_.selected_item().tag());
for (auto iterator = colors().rbegin(); iterator != colors().rend(); ++iterator)
add_color_panel(*iterator);
if (index == npos || colors_.size() == 0) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace colors_example {
color_box_panel_.paint += [&](xtd::object& sender, xtd::forms::paint_event_args& e) {
e.graphics().fill_rectangle(xtd::drawing::drawing_2d::hatch_brush(xtd::drawing::drawing_2d::hatch_style::wide_checker_board, xtd::drawing::color::from_argb(0x66, 0x66, 0x66), xtd::drawing::color::from_argb(0x99, 0x99, 0x99)), e.clip_rectangle());
if (color_ != xtd::drawing::color::empty) e.graphics().fill_rectangle(xtd::drawing::solid_brush(color_), e.clip_rectangle());
xtd::forms::control_paint::draw_border(color_box_panel_, e.graphics(), color_box_panel_.border_style(), color_box_panel_.border_sides(), xtd::forms::application::style_sheet().system_colors().control_text(), e.clip_rectangle());
xtd::forms::control_paint::draw_border(color_box_panel_, e.graphics(), color_box_panel_.border_style(), color_box_panel_.border_sides(), xtd::forms::application::style_sheet().system_colors().control_text(), xtd::drawing::rectangle::add(e.clip_rectangle(), -1, -1));
};

hex_label_.parent(*this);
Expand Down

0 comments on commit f7b1085

Please sign in to comment.