Closed FiveKm closed 5 months ago
by the way, you can use a short title issue, and add detail information in description
Is your requirement for SCheckbox to maintain in line display or for it to occupy a certain height without displaying collapse
你的需求是为了让SCheckbox保持行内显示,还是使它可以占据一定的高度而不显示塌陷
maybe I need to make SCheckbox height flexable
thanks for your answer,I thought active
was an indication of whether SCheckBox was active or not。
Rectangle{ width: 180px; height: 40px; SCheckbox{ text: "L" + (i+1) + " - G"+(j+1); actived: true; visible: true; }
I want Scard
and SText
to be centered in SCheckBox
OK I think, That is a desire to let SCheckbox can put into any layout and still hold in a line.
I will fix it in 30 minutes and republish the V0.4.2 pag
Hopefully SurrealismUI will get better and better and used by more people, there is a setting that has bothered me for a few days, please ask why SCheckbox's TouchArea
is set in SCard
, instead of covering the entire area like Slint's native CheckBox
I have already finish update now you can directly use:
SCheckbox {
height: 40px;
}
Hopefully SurrealismUI will get better and better and used by more people, there is a setting that has bothered me for a few days, please ask why
SCheckbox's TouchArea
is set inSCard
, instead of covering the entire area like Slint's native CheckBox
The main purpose is to distinguish the click area. actually SurrealismUI still as a low level widget, I wanna each widget can be controlled. that means you can use SurrealismUI as a basic widget and secondary build your own widget lib
I tested the new version and it works fine。Thank you for your answers and for sharing the course on the Bilibili website。
It seems I forget to add example into SurrealismUI Book you can get
actived
prop from SCheckbox, In SurrealismUI all check state namedactived
you can see this example: https://github.com/Surrealism-All/SurrealismUI/blob/main/tests/src/checkbox.slint and if you see the source code, you can find that SCheckbox is a line widget which means if you make a Rectangle outside the widget and set height it will make SCheckbox inherits height:我好像忘了在SurrealismUI书中添加示例 您可以从SCheckbox中获取“actived”道具,在SurrealsimUI中,所有名为“actived` 您可以看到以下示例:https://github.com/Surrealism-All/SurrealismUI/blob/main/tests/src/checkbox.slint 如果你看到源代码,你会发现SCheckbox是一个行小部件,这意味着如果你需要在小部件外部制作一个矩形并设置高度,SCheckbox会继承外部高度: