Commit Graph

42 Commits

Author SHA1 Message Date
a76c3c714e testing: Mention non-default scaling-settings during scaling-tests
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/679>
2024-09-23 11:49:54 +02:00
5288e10cab scaling: Add GSettings for adjusting the height of the panel
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/679>
2024-09-23 11:49:53 +02:00
3387154ac1 scaling: Improve scaling
Issues fixed by this change:

- Empty space above and below layouts.
- The compact shape, which is supposed to be used on small screens,
  did not scale up until it reached the border of the screen, on some
  screens, resulting in empty space next to it, and smaller buttons.
- The compact shape was used on some screens in horizontal orientation,
  instead of the wide shape.
- The panel was rather small on large screens.

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/677>
2024-09-21 10:21:42 +00:00
9a261acdfd state.rs: Make get_preferred_height_and_arrangement easier to understand
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/677>
2024-09-21 10:21:42 +00:00
84341b88cd Improve shape-selection with a workaround
This workaround makes Squeekboard use the wide shape on more devices.

On many devices with wide screens, which should use the wide shape
for layouts while in horizontal orientation, the compact shape was
used instead.
In particular, 5" large displays with an aspect-ratio of 16:9,
which are relatively common, were using the compact shape.

This workaround has the side-effect of allowing for more empty space
above and below the wide shape, to fit the layout into the available area.
The buttons on displays where this would be noticeable,
should still be larger than before.

To find an appropriate point for switching between the shapes without
having the relevant displays to test with,
one can create an image sized according to the device's display-resolution
and pixel-density, place a line representing the height of Squeekboard
(based on the scaling-tests), paste images of compact and wide
layout-shapes into the area and scale them appropriately,
set the image-viewer to show the image according to physical size,
and then compare which one fits better.

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/639>
2024-05-03 10:41:14 +00:00
2eb06ae350 src/state.rs: Add comments related to shape-selection
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/645>
2024-04-22 08:40:25 +00:00
7308eeefe1 Add even more scaling-tests
and sort the tests by aspect-ratio, size, and resolution.

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/645>
2024-04-22 08:40:25 +00:00
c21fbd86ac Change "GPL-3.0+" to "GPL-3.0-or-later"
The "GPL-3.0+"-SPDX-license-identifier has been deprecated,
and was replaced with "GPL-3.0-or-later".

More information about that, is available in the
"Deprecated License Identifiers"-part of
https://spdx.org/licenses/ .

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/642>
2024-04-14 17:49:06 +02:00
69805b4565 Add more scaling-tests
These are based on actual displays/devices.

A display-size-calculator ( https://www.sven.de/dpi/ ) was used to
calculate the width and height from resolution and diagonal display-size.

Some of these tests check for non-optimal results;
however, their purpose is mostly to make it noticeable
how changes to scaling-behaviour affect various
display-types.

When Squeekboard's scaling-behaviour will be improved, the tests
should be updated with values that fit the displays/devices better.

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/640>
2024-04-11 17:38:03 +02:00
8c89b4dc2c cleanup: Remove debug prints 2023-03-15 12:53:22 +00:00
367d8dd5c7 state: Make size independent of scaling factor 2023-03-14 12:16:15 +00:00
dcz
b0bf78b2a6 Merge branch 'saver' into 'master'
popover: Deactivate settings button when lock screen is on

See merge request World/Phosh/squeekboard!582
2023-01-02 12:21:23 +00:00
828279d03c rust: Use 2018 eition
This edition has better syntax around scoping and `use`.
2022-12-21 12:20:17 +00:00
783ca9ae11 structure: Create a module for custom event loops 2022-12-06 12:19:17 +00:00
e5be92efae loop driver: Decouple from concrete state 2022-11-28 15:53:41 +00:00
e7c2350c92 event loop: Decouple event handler from concrete state 2022-11-28 15:53:41 +00:00
e0b37d60c4 event loop: Decouple state type from event handler 2022-11-28 15:53:41 +00:00
23d6beee8e event loop: Decouple event timeout from event type 2022-11-28 15:53:41 +00:00
4ae78b89c6 state: Don't animate when force-hidden 2022-07-08 05:34:36 +00:00
c1ceec3673 state: Become the source of layout choice
A redesign of popover was needed: it can no longer query the application state directly due to current state being its own actor, so instead the popover gets a dedicated copy of the relevant state.

I'm not entirely happy with the extra complexity of having an extra actor just for 1 string, but at least the duplication between C and Rust and mutual calls have been reduced.
2022-06-06 16:10:53 +00:00
8d0e1b4548 state: Use IM hint and purpose for layout selection 2022-06-06 16:10:53 +00:00
e6326b9b38 state: Use dummy layout command 2022-06-06 16:10:53 +00:00
b634e2bfa4 state: Decide panel arrangement
Combines arrangement with layout to get panel contents as outcome.

Includes some path syntax changes for 2018 compatibility.
2022-06-06 16:10:53 +00:00
590cd71f49 state: Store layout override
Not used for any externally observable effects
2022-06-06 16:10:53 +00:00
8ff72f312a state: Include layout choice in visible outcome
This is still in preparation and doesn't issue any observable effects.
2022-06-06 16:10:53 +00:00
82774d2315 state: Record layout choice
This does not get plugged into anything but debug prints yet.
2022-06-04 17:47:09 +00:00
2eec3372f3 panel: Split away panel handling
This reduces ServerContextService to a mere handler of "docked mode" gsetting.
2022-04-13 16:49:33 +00:00
dcz
f6724c0948 Merge branch 'debug' into 'master'
Enable debugging at runtime

See merge request World/Phosh/squeekboard!526
2022-04-13 16:40:36 +00:00
397f5e126e state: Add sizing unit test 2022-04-07 14:30:46 +00:00
6528879fed state: Derive panel size from physical click target size 2022-04-06 15:53:37 +00:00
57aeeaa882 output: Store physical size 2022-04-06 08:58:41 +00:00
bbceba7e9b debug: Add dbus interface to control debug prints 2022-04-05 14:19:52 +00:00
83b0d1553f state: fix "wide mode" detection in portrait orientation
We need to check if we should use the wide layout based on the
*logical* display width, not its *physical* resolution.
2022-04-05 10:16:22 +00:00
29b30fbe22 panel: Use scaling to set height 2022-04-05 09:26:11 +00:00
16d6871422 panel: Apply a hard limit of 1/2 height 2022-02-04 09:40:21 +00:00
697be64418 visibility: Forward panel height information to window creation 2022-02-04 09:40:21 +00:00
f040e708a4 Carry output information on visible command all the way to C 2022-02-04 09:40:18 +00:00
3f598086b7 Store preferred output 2022-01-30 12:43:17 +00:00
3b0b8bea0d Save outputs state 2022-01-28 15:26:22 +00:00
d3eb68ed5a outputs: Notify the state manager about changes 2022-01-26 15:19:58 +00:00
f4f44a49ae wayland: Move initialization to the Rust side
This will help make the init procedure safer, by limiting the number of Rust objects that need to be carried to the C side and may be mangled on the way there.

The second benefit is that it allows outputs to become part of new state management.
2022-01-26 15:19:58 +00:00
4cc7017e1c event_loop: Separate and use for physical keyboard presence
Extra included: Change of naked Submission pointers to Wrapped.
2021-12-12 12:49:11 +00:00