Commit graph

48 commits

Author SHA1 Message Date
Tobias Hunger
20c1c45253
Button: Implement support to make the Button a toggle (#1384)
Add flags that enable the Button to be used as a Toggle, e.g. for use in toolbars or similar places.

Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2022-07-08 16:17:06 +02:00
Olivier Goffart
ffeb5c50c0 Docs: consistently put the property type in italic 2022-07-06 09:53:06 +02:00
Olivier Goffart
9f78674124 Fix links to enums in the docs
The JS was fixing links to `*.md` files, but not `*.md#foo`
2022-07-06 09:39:54 +02:00
pubg-hacks
aed71311ca Add a read-only propery to TextInput, LineEdit and TextEdit 2022-06-08 09:23:01 +02:00
Olivier Goffart
9fa59d38cd Generate the enum documentation based of the common/enums.rs
So that makes it harder to forget to update the docs

Note that the new builtin_enums.md does not contain a `### Values`
section header anymore. Also some enum where documented with the full
enum value (such as `TextHorizontalAlignment.left`) while now this
is omitted

The CI should fail if one forget to run `cargo xtask enumdocs` after
adding an enum or changing the docs
2022-05-13 13:15:51 +02:00
Simon Hausmann
079a8a75d6 Fix sizes of some of the preview canvas elements in the docs
Don't fix the canvas to 100/100 physical pixels, as not all examples fit into that. Instead
let the GL backend resize according to constraints,
and add some missing sizes to some examples.
2022-03-21 16:53:30 +01:00
Simon Hausmann
f21040614c Fix for combo not being visible in the docs
Make sure that the window is height enough to have space for it.
2022-03-09 10:26:01 +01:00
Olivier Goffart
c9319add6a Export the input-type from the LineEdit 2022-03-02 21:55:49 +01:00
Olivier Goffart
00ff5e21a7 Update git repository URL 2022-02-08 08:26:21 +01:00
Tobias Hunger
2b55c488ca
Rename sixtyfps to slint in internal 2022-02-02 16:16:55 +01:00
Olivier Goffart
3594c20153 Replace SixtyFPS in many locations (Uppercase) 2022-02-02 15:49:18 +01:00
Olivier Goffart
692171bf0c Change the 60 blocks to slint blocs in documentation comments 2022-02-02 10:51:42 +01:00
Olivier Goffart
0308f86cd4 Rename sixtyfps_widgets.60 to std-widgets.slint 2022-02-01 18:58:54 +01:00
Boris Zhguchev
38bd1917a0
Add support for font-size to LineEdit and Text-Edit widgets. (#872)
closes #435
2022-01-26 15:08:04 +01:00
Jared Moulton
63fd204dda Update the Flickable and ScrollView docs...
...to include mention that the default is for the viewport dimensions to
be calculated automatically and add properties and and an example to the
Flickable docs
2021-12-06 11:59:09 +01:00
Jared Moulton
a3c0771a2a Update Flickable and ScrollView docs...
...to include information about having to manually set the
viewport-width and viewport-height when using a for loop to instantiate
elements.
2021-12-06 11:59:09 +01:00
Olivier Goffart
98e1bb19db
Document the current-index property of the TabWidget 2021-10-07 12:21:11 +02:00
Simon Hausmann
c23f98968e Add missing newline for doctests 2021-10-05 23:16:46 +02:00
Simon Hausmann
4a26faef9a Add AboutSixtyFPS element 2021-10-05 23:16:46 +02:00
Olivier Goffart
671df0f24f New widget: StandardButton 2021-09-29 16:25:44 +02:00
Olivier Goffart
cbf22d494e TextEdit 2021-09-06 21:52:12 +02:00
Olivier Goffart
ff441d3db6 Improve a bit the preview in the documentation with nightly rustdoc
The example are in a layout so "float:right" doesn't have an effect in that div
Instread, just put the preview inside the example.

This also remove the "Preview:" text
2021-08-12 13:57:36 +02:00
Olivier Goffart
8b2d1f1d8f Docs: replace underscores by dashes 2021-08-10 22:21:01 +02:00
Olivier Goffart
b6137ecbc4 Error when trying to use internal builtin items 2021-08-09 17:43:22 +02:00
Olivier Goffart
a89d83e58f Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-08-06 15:58:13 +02:00
Olivier Goffart
d41839abe3 Compiler pass for the TabWidget
it will lower the TabWidget into a TabWidgetImpl and the tabs into TabImpl
2021-08-06 15:58:13 +02:00
Olivier Goffart
90cdb5ab5d Add a changed callback to Slider
Closes #125
2021-07-31 15:14:03 +02:00
Simon Hausmann
14c6819791 Add support for icons in the Button widget
The icon in the gallery example was generated via https://emoji.aranja.com
2021-07-27 19:37:06 +02:00
Olivier Goffart
d81f07d20b Fix rustdoc warning 2021-07-13 11:51:50 +02:00
Olivier Goffart
cc7242c523 Add a selected callback to ComboBox 2021-07-13 11:42:31 +02:00
Olivier Goffart
6263979357 Add missing documentation for ComboBox 2021-07-13 11:34:47 +02:00
Tobias Hunger
e01bd87df8 Janitor: Fix warnings about markdown files
These might change the layout of the rendered markdown files. This will
also fix some typos along the way:-)
2021-06-28 08:32:25 +02:00
Olivier Goffart
962dc0075c Layout: Make the default padding and spacing 0
and add Box widgets that have proper defaults

Closes #200
2021-06-21 14:29:53 +02:00
Simon Hausmann
e61529976e Issue warnings when creating bindings against deprecated properties 2021-02-02 22:42:02 +01:00
Olivier Goffart
96e002ecba Fix documentation 2020-12-30 12:12:43 +01:00
Olivier Goffart
8797f6512d Rename Slider min/max property
For consistency with the SpinBox

Fixes https://github.com/sixtyfpsui/sixtyfps/issues/138
2020-12-30 10:02:38 +01:00
Olivier Goffart
56b67eac8c Complete the last patch to add a minimum/maximum properties to the SpinBox 2020-12-29 09:44:19 +01:00
Olivier Goffart
0d2d48be4f Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
Olivier Goffart
183f300a85 Implement the temperature converter in the .60 code
A edited signal was required on the line edit
2020-11-03 18:23:37 +01:00
Olivier Goffart
59707f068c add a enabled property on the line edit 2020-11-02 18:20:01 +01:00
Olivier Goffart
dc98487160 Add a placeholder-text property to LineEdit 2020-10-27 10:55:08 +01:00
Simon Hausmann
a695d551da Small typo fix 2020-10-16 14:59:58 +02:00
Simon Hausmann
6aa292eac1 Change the names of the logical and physical pixel units
The logical pixels are now just called "px" and the less frequently
used physical pixels have the "phx" suffix.

The existing markup was adapted using the syntax updater and the
following patch:

    +    if node.kind() == SyntaxKind::NumberLiteral {
    +        if node.text().ends_with("lx") {
    +            return write!(
    +                file,
    +                "{}px",
    +                node.text().as_str().split_at(node.text().as_str().len() - 2).0
    +            );
    +        }
    +        if node.text().ends_with("px") {
    +            return write!(
    +                file,
    +                "{}phx",
    +                node.text().as_str().split_at(node.text().as_str().len() - 2).0
    +            );
    +        }
    +    }

Fixes #49
2020-10-16 07:19:40 +02:00
Olivier Goffart
e48f0b7621 Add a current item to the StandardListView 2020-10-14 14:32:18 +02:00
Olivier Goffart
8f1c5a96c1 Fix ListView being scrollable when it shouldn't
Relates to #86
2020-10-13 13:45:18 +02:00
Olivier Goffart
d0611d8491 Document widgets that were missing documentation 2020-10-12 13:36:25 +02:00
Simon Hausmann
3eef23f93c Add widgets to the C++ docs as well 2020-09-03 12:05:50 +02:00
Olivier Goffart
8a7afbc238 Documents the elements 2020-09-02 18:57:24 +02:00