Commit graph

22 commits

Author SHA1 Message Date
Simon Hausmann
aafb96cb93 Get rid of abi::datastructures::WindowProperties
Instead, pass a reference to the root item when mapping the window,
at which point we can downcast to the new Window item. If we have one,
then we'll read its width/height (for initial values) and install
bindings to keep them up-to-date.
2020-08-12 09:44:42 +02:00
Olivier Goffart
b5c9bf5d10 Settings page for the printer demo
Fix the text maximum size so it can be put in a layout
2020-08-11 12:08:44 +02:00
Olivier Goffart
36243ccdf7 Traverse item front to back for input events 2020-08-10 10:45:02 +02:00
Olivier Goffart
2ba40ebc96 Printerdemo: small effect on press
It works now that we have a grabbed item.
2020-08-07 16:32:49 +02:00
Olivier Goffart
0a56912d0f Mouse grab in rust 2020-08-07 16:06:49 +02:00
Simon Hausmann
8b74381097 Some work on the copy page 2020-08-07 15:53:59 +02:00
Simon Hausmann
a6c7dd1610 Add placeholder pages for copy/fax/settings 2020-08-07 13:49:24 +02:00
Simon Hausmann
1ba3b848fd Fix default font size for the page buttons
Bigger looks better :-)
2020-08-07 10:37:29 +02:00
Simon Hausmann
aecf6a8878 Center text in buttons in the demo and gallery
This adds horizontal_alignment/vertical_alignment properties, along with
width/height to Text.

This still uses a hard-coded enumeration in the compiler, which is meant
to go away in favor of general enum support.
2020-08-07 10:02:52 +02:00
Simon Hausmann
87cac657b2 Scale the icon size with the size of the window 2020-08-05 14:55:59 +02:00
Simon Hausmann
5dfb9aa875 Fix initialize size of printer demo
Map it to 800x600 logical pixels for a better initial look.

This implements respecting the initial values for width/height and tries
to apply them to the window begin created.

The PinnedOptionalProp wrapper is needed because while cbindgen mapped
the previous Option<&...> to a raw pointer, the new Option<Pin<&...>> is
not detected as a pointer.
2020-08-05 13:22:53 +02:00
Olivier Goffart
2dd3cecc5a Add a SpinBox 2020-08-05 12:56:13 +02:00
Simon Hausmann
fb763eeb8e Fix initial icon sizes
Now that the scale factor is initialized, these need adjusting.
2020-08-05 10:51:40 +02:00
Simon Hausmann
d3c596669c Add larger icons to the printer demo
The icons on the main screen are now nicely large and they scale down on
activation.
2020-08-05 10:04:11 +02:00
Olivier Goffart
c9fab854e3 Some tweek in the animation 2020-08-04 18:18:55 +02:00
Simon Hausmann
504b4a327b Provide the svg source for the image and a conversion script 2020-08-04 17:22:55 +02:00
Simon Hausmann
685a3fb8ab Rename Text::font_pixel_size to just font_size
Since length are resolution independent, it doesn't make sense anymore
to have the pixel infix.
2020-08-04 16:56:42 +02:00
Simon Hausmann
4aed6ac6f3 Small touch-up on the rectangles 2020-08-04 16:37:10 +02:00
Simon Hausmann
254df328d0 Add support for images (resources) in models
This also allows replacing the emojis (not working due to lack of fallback) with images
2020-08-04 16:09:33 +02:00
Olivier Goffart
8c793c81e9 Implement some transition between pages 2020-08-04 14:13:22 +02:00
Olivier Goffart
d158690a88 Add some buttons for the printer demo 2020-08-04 12:19:32 +02:00
Olivier Goffart
3becd69bc5 Skeleton for the printerdemo 2020-08-04 10:11:02 +02:00