Commit graph

194 commits

Author SHA1 Message Date
John
d8a76aba7c Update printerdemo.60
Fixed alignment of the back arrow and the title
2020-10-13 21:36:58 +02:00
Olivier Goffart
ed83fa7aa2 Fix the animation in the printer demo.
We don't want 'x' to depends from properties which are themself animated,
otherwise it just restarts the animation on every frames
2020-10-13 12:14:11 +02:00
Simon Hausmann
bc8fefd631 Use a dummy list view in the print page
Better than hello world :-)
2020-10-13 11:56:50 +02:00
Simon Hausmann
9f115ca004 printer demo: Use a layout for the copy page 2020-10-13 11:52:58 +02:00
Simon Hausmann
d771143f68 Make it possible to exit the printer demo
... by clicking on the power button :-)

Calling exit is a big rough, but simplest and fastest for now.
2020-10-07 15:53:07 +02:00
Olivier Goffart
221bb853d7 Change the exaple to used named struct for models 2020-09-17 14:00:50 +02:00
Simon Hausmann
625cb6c6b8 Add a constructor to Text and let the color default to black
We really shouldn't require specifying a color for every Text {} element just in order
to see *some* text.

For Rectangle OTOH transparent is a good default (and thus for Color), hence
this change just to Text.

Right now the constructor bit is also a bit repetitive, this could
perhaps be folded into BuiltinItem to generate the ffi, default impl and
forward to an init function if it exists.
2020-09-16 08:20:13 +02:00
Simon Hausmann
6b8ccc5ef4 Some touch-ups for the printer demo's settings page 2020-09-09 08:53:15 +02:00
Simon Hausmann
ec07d6bfe8 Tweaks to the color schemes of the printer demo and ugly style/gallery
The printer demo looks slightly less boring on white background with brighter colors.

In exchange, the controls can become more dull and hopefully easier to see.
2020-09-08 15:30:28 +02:00
Olivier Goffart
0751552068 Printer demo: the ink data now comes from the native code 2020-09-04 15:49:33 +02:00
Simon Hausmann
7ca8cf7cdd Change the color scheme of the printer demo a little
To adjust for better contrast in the style changes
2020-09-02 09:25:39 +02:00
Simon Hausmann
704644c752 Reduce use of bright colors in the printer demo
Use slightly aggressive colors for the buttons of the printer demo,
shrink the ink cartridge bars a little and replace the red for the 2000
with a more subtle silver.

Based on privately received feedback ;-)
2020-09-01 15:05:40 +02:00
Olivier Goffart
9782d85fdb Native style works with C++ 2020-09-01 12:25:11 +02:00
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Olivier Goffart
dcf5e63203 Put the shebang before the license header 2020-08-24 12:28:02 +02:00
Olivier Goffart
725db91878 Fax page 2020-08-24 08:38:30 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Simon Hausmann
86b67787a1 More printer demo polish
* Align the images on the main screen buttons
    * Increase the spacing between the images and the button text
2020-08-14 14:27:34 +02:00
Simon Hausmann
85b1ec0ea9 Add a subtle background gradient 2020-08-14 14:20:36 +02:00
Simon Hausmann
1a42f446a2 Replace the logo in the printer demo with a visual power button 2020-08-14 14:04:09 +02:00
Simon Hausmann
92d5f4d493 Place the project logo in the top right corner of the printer demo
That'll look nicer in the screenshot :)
2020-08-13 18:19:53 +02:00
Olivier Goffart
f7c1e112b3 Some stuff in the home screen of the printer demo 2020-08-12 14:54:08 +02:00
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