Skip to content

Commit 648961b

Browse files
committed
use rectangle for touch::selection_box
1 parent dbf40d0 commit 648961b

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

src/ruis/widget/button/touch/selection_box.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2626

2727
using namespace std::string_literals;
2828
using namespace std::string_view_literals;
29+
using namespace ruis::length_literals;
2930

3031
using namespace ruis::touch;
3132

@@ -43,10 +44,19 @@ selection_box::selection_box(
4344
std::move(params.widget_params)
4445
),
4546
// clang-format off
46-
container(this->context,
47+
rectangle(this->context,
4748
{
4849
.container_params{
4950
.layout = ruis::layout::row
51+
},
52+
.padding_params{
53+
.borders = {10_pp}
54+
},
55+
.color_params{
56+
.color = this->context.get().style().get_color_middleground(),
57+
},
58+
.rectangle_params{
59+
.corner_radii = {10_pp}
5060
}
5161
},
5262
{

src/ruis/widget/button/touch/selection_box.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2222
#pragma once
2323

2424
#include "../selection_box.hpp"
25+
#include "../../label/rectangle.hpp"
2526

2627
namespace ruis::touch {
2728

2829
class selection_box :
2930
public virtual ruis::widget, //
30-
private container,
31+
public rectangle,
3132
public ruis::selection_box
3233
{
3334
public:

0 commit comments

Comments
 (0)