Commit graph

238 commits

Author SHA1 Message Date
Simon Hausmann
754922f965 Remove stray debug properties 2024-09-19 08:21:28 +02:00
Nigel Breslaw
f271502d43
Simplify the printerdemo home page (#5803)
Items are auto centered these days so no need for extra bindings.
The buttons also look after themselves and don't need logic in the loop to resize them.
2024-08-08 17:48:18 +02:00
Nigel Breslaw
e4cb55bb4f
Give printerdemo a clear palette (#5789)
This cleans up the light and dark mode palette.
It reduces the number of duplicate colors and also uses the system default color scheme.
2024-08-08 12:35:30 +02:00
Simon Hausmann
9543a26201 Fix printer demo coming up too small in live-preview
There's an issue that the live-preview doesn't respect the preferred size when actively choosing to preview a new component, but regardless it makes sense to avoid shrinking the printer demo.

Amends ccc795beb8
2024-08-08 11:04:16 +02:00
Nathan Collins
ccc795beb8 Printerdemo window uses preferred width
On full-screen platforms (e.g. the Zephyr demo) it will expand to fill
the screen. Otherwise, the window is the preferred size.
2024-08-07 15:26:32 +02:00
Nigel Breslaw
0fd9bf4b99
UX enhance the Printerdemo primary screen (#5782)
* The general page change animation is more subtle. It's now a combo of fade in and move. As opposed to a full page slide.
* The SVG also has been tweaked to make it symmetrical and remove the lopsided bulge it had.
* The sidebar buttons touch area covers the whole space they represent, as opposed to just being the same size as the icon.
* The code has been simplified a bit. Layout values are moved to DemoPalette and animation values are based on reusable variables to make changing the timings easier.
2024-08-07 14:52:58 +02:00
Tobias Hunger
05e0b4dc68 live-preview: Have a simple mode for bools and strings
The property editor built into the live-preview now comes with the
concept of a "simple/complex mode". There is a "K" (for complex, obviously;-)
or a "S" (for simple, just as obvious) beween the property name and property
value. you can click on the letter to switch from simple to complex mode,
but you can only switch back to simple mode if there are no complex expressions
in the line edit.

This implements a "simple" mode for bools.

# Todo

 * [ ] Find icons for simple/complex mode:-)
 * [ ] Figure out how to decide whether other types are "simple"
 * [ ] Define more UIs for simple types

live-preview: Move simple property code into rust

... and handle simple strings in addition to bool.
2024-07-10 11:47:06 +02:00
Olivier Goffart
acb7da11d2 fix missing warning of missing export
... for last component when globals are exported
2024-06-21 11:57:49 +02:00
Olivier Goffart
808b1ef946 Add a function to mark translated strings as dirty 2024-04-18 19:23:57 +02:00
Simon Hausmann
80593b4f71
Revert the use of enums in the printer demo (#4778)
This reverts commit 060f63ad56, as it broke the C++ interpreted demo and makes it impossible to implement the demo "fully" in JavaScript and Python.

cc #4777
2024-03-06 18:54:33 +01:00
Simon Hausmann
adcfa9b9ca janitor: fix indentation of comment 2023-12-21 09:13:00 +01:00
Florian Blasius
4ec63a9c71
cleanup examples according to upcoming code guidelines (#3809) 2023-11-02 11:04:40 +01:00
Olivier Goffart
46847438ca Fix warnings about calling private functions
Recently added warning
2023-10-11 10:50:50 +02:00
Simon Hausmann
060f63ad56 Use enums in the printer demo 2023-06-16 12:30:04 +02:00
Olivier Goffart
11dea135f7 Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
Aurindam Jana
e4338300de
Change license for examples to MIT (#2887) 2023-06-15 11:23:17 +02:00
Olivier Goffart
9e684d7c3e French translation of the printer demo 2023-06-09 07:57:38 +02:00
Olivier Goffart
a6d8871d8d Printer Demo: improve a few strings 2023-06-08 19:13:24 +02:00
Olivier Goffart
9052fe09e8 Printer demo: wraps strings in @tr()
(doesn't include the native code, only .slint)
2023-06-08 19:13:24 +02:00
Simon Hausmann
6b8214c3f9 Add support for italic and bold text in the software renderer's bitmap font path
In the screenshot tests this works by setting SLINT_DEFAULT_FONT to
pointer to a directory, instead of a file. We then load all fonts in
that directory and consider their families the default unless a family
is specified. This way for "Noto Sans" a regular as well as an italic
version is registered in fontdb and returned in the list of font
fallback ids. embed_glyphs in the compiler then embeds those variants
and we find them at run-time.
2023-05-31 18:47:39 +02:00
Olivier Goffart
6441968a43 Janitor: Remove trailing spaces in most files 2023-05-04 08:14:28 +02:00
Simon Hausmann
a2a693b248 Improve appearance of comboboxes in the printer demos
Work around #2284
2023-03-09 10:03:04 +01:00
Tasuku Suzuki
a3d1ddb3d3 printerdemo: Improve category labels' visibility in night mode 2023-03-01 10:28:13 +01:00
Tobias Hunger
f0ffc5d243
Fix line endings and add a pre-commit hook
... to keep them fixed:-)
2023-02-23 11:09:50 +01:00
Florian Blasius
520df46998
Update examples to new syntax (#2067)
* run slint-updater on examples
* manual syntax updates
2023-01-16 12:11:25 +00:00
Olivier Goffart
91dabcbddf Use functions in our examples, instead of callback 2022-12-06 14:56:25 +01:00
Olivier Goffart
51933b99bb New syntax for transitions, within the state 2022-11-22 15:16:54 +01:00
Olivier Goffart
2b68995e1c printerdemo_mcu: prettyfiy the checkbox and make the text clickable 2022-06-20 10:29:38 +02:00
Tobias Hunger
278e89314f
printerdemo_mcu: Align page_selection.svg to pixel grid (#1360)
Improve alignment of page_selection.svg to the pixel grid.
2022-06-17 18:20:02 +02:00
Tobias Hunger
d5d29f59f9
Polish Icons in printerdemo (#1357) 2022-06-17 14:03:04 +02:00
Simon Hausmann
ebb6dd4449 janitor: Fix typo 2022-04-19 16:58:06 +02:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Simon Hausmann
26d205890c Fix up email address seen in printer demo 2022-02-08 10:39:53 +01:00
Olivier Goffart
91e107150e Merge remote-tracking branch 'origin/wip/rename'
Conflicts:
	examples/opengl_underlay/index.html
	examples/opengl_underlay/main.cpp
2022-02-08 07:29:41 +01:00
Tobias Hunger
ca469048c6 Replace cat picture used in examples
* Use a jpg over an png, which is much smaller
* Do not round the image
* Change the image file extensions used in the demos to reflect the
  actual image format being used
* Do not use symlinks for images: This breaks the WASM demos
2022-02-07 15:29:13 +01:00
Olivier Goffart
16d4d2429a Printer Demo: ability to change the image in the preview 2022-02-07 10:32:03 +01:00
Olivier Goffart
3594c20153 Replace SixtyFPS in many locations (Uppercase) 2022-02-02 15:49:18 +01:00
Olivier Goffart
03534039d6 Replace more .60 by .slint
Mainly an automated change with
    git grep -O"sed -i 's/\.60/.slint/g'" -w "\.60"

and some manual checks
2022-02-02 10:12:31 +01:00
Olivier Goffart
d706d63ce1 Replace references to the .60 files that are now renamed with .slint 2022-02-02 10:12:31 +01:00
Olivier Goffart
0c0a783095 Rename all our .60 files to .slint 2022-02-02 10:05:45 +01:00
Olivier Goffart
0308f86cd4 Rename sixtyfps_widgets.60 to std-widgets.slint 2022-02-01 18:58:54 +01:00
Tobias Hunger
08df4aa6d2 Add configuration for the reuse tool
Add configuration for the [reuse-tool](https://github.com/fsfe/reuse-tool) and
mark up license information.
2022-01-29 18:33:05 +01:00
Tobias Hunger
0063476aff Update license information
Use the reuse tool to get a better grip on licenses used in sixtyfps.
Fix a couple of licenses along the way.

* Uses creative commons for our own logo (commercial use!)
* Fixes some license information found in README files and documents
  them with proper .license files.
* Document Apache/MIT for helper_crates/const-field-offset which matches
  what its documentaion site says it uses.
* Add a list of licenses that apply to crates we publish and the tooling
  we have.

This patch only adds static information and does not contain any tooling
support.
2022-01-20 14:45:02 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Olivier Goffart
acf2ef38a6 Don't put no-frame on the printer demo example
Prefer just put it in a random test instead
2021-10-11 10:30:31 +02:00
Robert Broketa
c3c7765f80 Add no-frame property for a borderless/frameless window 2021-10-11 10:21:21 +02:00
Olivier Goffart
07e2532c0b Printer Demo: rename PrinterQueue component
PrinterQueue -> PrineterQueueView
PrinterQueueData -> PrinterQueue
2021-08-27 16:55:07 +02:00
Olivier Goffart
fefc7f31d0 Port the printer demo to use exported globals 2021-08-27 16:55:07 +02:00
Tobias Hunger
aea4ecca99 Apply pre-commit hooks to all files 2021-08-17 22:38:16 +02:00
Olivier Goffart
ffccef4e0c Examples: replace all _ by - in identifiers 2021-08-10 22:21:01 +02:00