Commit Graph

406 Commits

Author SHA1 Message Date
David Boddie 7b6c6e51b3 Fix background rendering 2019-08-02 17:04:16 +02:00
David Boddie 42b2b3b8f6 Replace the Eek theme support with GTK classes
This brings the appearance of the keyboard basically in line with what
was there before. The background and key borders still need to be fixed
and the text and icons should probably be drawn using the style context.
2019-08-02 17:04:16 +02:00
David Boddie 64680664e3 Use a CSS provider and style context instead of the old theme support 2019-08-02 17:04:16 +02:00
David Boddie 87dd9b4374 Remove references to the removed theme classes 2019-08-02 17:04:16 +02:00
David Boddie c7d5e8d152 Remove theme classes for future replacement 2019-08-02 17:04:16 +02:00
David Boddie 4cd15c074e Merge branch 'fixes' into 'master'
Fixes

See merge request Librem5/squeekboard!115
2019-08-02 15:03:33 +00:00
David Boddie 9bfdabdf57 Merge branch 'textproperty' into 'master'
Removed text categories

See merge request Librem5/squeekboard!114
2019-08-02 14:36:41 +00:00
David Boddie f852cab0f9 Fix warnings, add gtk-doc strings 2019-08-02 12:49:15 +02:00
David Boddie f53babcd68 Add gtk-doc style comment 2019-08-02 12:48:35 +02:00
David Boddie 016c1086e6 Center the keyboard horizontally
Also simplify individual key rendering to make the rendering model more
coherent.
2019-08-02 12:48:35 +02:00
Dorota Czaplejewicz f7dd4c84b1 renderer: Render label directly 2019-08-02 09:21:38 +00:00
Dorota Czaplejewicz b8389f6736 symbol: Simplify symbol storage 2019-08-01 20:25:01 +00:00
Dorota Czaplejewicz 6c1c979414 section: Removed multiple rows in section, row/column in key 2019-08-01 20:10:59 +00:00
Dorota Czaplejewicz 43df82355a EekKey: Remove column and row fields 2019-08-01 20:10:59 +00:00
Dorota Czaplejewicz d8b26040f9 symbolclass: Remove with surroundings
Collaterals: Enabled strict checking of initializers, fixed scripts generating keycode mappings.
2019-08-01 20:08:37 +00:00
Dorota Czaplejewicz bdf29bf57b symbol: forget serializing 2019-08-01 19:59:34 +00:00
Dorota Czaplejewicz 504285c08f fonts: Reset font size to a constant
The font size will only be affected by the scaling factor, and not by an attempt to fit the labels into buttons.

Left to do: adjust it based on CSS.
2019-08-01 17:25:38 +00:00
Dorota Czaplejewicz b5f0aa423b xml: Remove unused file 2019-08-01 14:16:01 +00:00
Dorota Czaplejewicz c81fdb18de eekelement: Fix case falling through 2019-07-31 14:11:03 +00:00
David Boddie 8f1de46381 Simplify layout and rendering
Remove pre-scaling of the bounds for the keyboard and its contents.
Calculate the scale factor based on the allocation and the desired width
and height of each keyboard, using the lower value of the horizontal and
vertical scale factors.
Apply scaling in the renderer and prepare to perform centering there.
2019-07-30 21:48:36 +00:00
Dorota Czaplejewicz 4aee4915d9 Merge branch 'generate-xkb-files' into 'master'
Generate XKB keymaps from XML instead of using pre-made ones

See merge request Librem5/squeekboard!90
2019-07-30 17:38:06 +00:00
David Boddie e801a68f0d Add comments to explain what empty labels do 2019-07-30 16:50:23 +02:00
Dorota Czaplejewicz 236415cde4 Merge branch 'add-landscape-orientation' into 'master'
Add landscape orientation

See merge request Librem5/squeekboard!99
2019-07-30 11:19:41 +00:00
David Boddie d49e0eaa1b Center the keyboard in landscape orientation 2019-07-26 22:27:56 +00:00
David Boddie 99a7786dc3 Remove declaration of unused variable 2019-07-26 12:01:04 +02:00
David Boddie 70895999c2 Generate XKB keymaps from XML instead of using pre-made ones 2019-07-25 22:25:29 +02:00
David Boddie ce311e1bf1 Use the standard button size for icons 2019-07-25 20:14:32 +00:00
David Boddie 1246776328 Create the keyboard surface every time it is needed
Icons are still blurry the first time the keyboard is shown after
rotation.
2019-07-24 14:04:28 +00:00
David Boddie ea15f69e73 Render the keyboard to a subsurface of the widget 2019-07-24 13:12:57 +00:00
David Boddie e5b6d66d60 Omit keys without labels on the current level, update key definitions 2019-07-20 17:17:37 +02:00
David Boddie a045810af6 Merge branch 'add-built-in-keymaps' into 'master'
Add built in keymaps

See merge request Librem5/squeekboard!78
2019-07-20 14:42:51 +00:00
David Boddie 6eb63f6a4c Refactor layout code, rescale and reformat when changing level 2019-07-19 17:35:49 +02:00
David Boddie f6d4ca0387 Place keys after symbols have been read, skipping blank keys 2019-07-19 17:35:49 +02:00
David Boddie 7b41466a77 Start to refactor keyboard section layout 2019-07-19 17:35:49 +02:00
David Boddie a5875402ef Move EekGtkRenderer features into EekRenderer 2019-07-18 15:42:27 +02:00
Guido Günther dbc8cc14bc Generate config.h
This allows us to remove a lot of #ifdef's. Either we want to use
a config.h or we don't. Since we'll want it for e.g. optional gsound
support later on let's have it.
2019-07-17 19:50:53 +02:00
Guido Günther 068c325ee2 EekGtkRenderer: Use a hash table for icon theme lookups 2019-07-17 17:14:42 +02:00
Guido Günther 3b076e5e64 EekGtkRenderer: Simplify type declaration
It's 2019.
2019-07-17 17:14:42 +02:00
Guido Günther c3a54595ea layersurface: Refresh layersurface on map
If the surface gets unmapped and mapped again we have another GDK window
so we have to reconfigure the layers surface on map and destroy it on
unmap.

This will be merged back into phosh if it works out.
2019-07-16 18:52:36 +02:00
Guido Günther 5827827008 Update layer surface code from phosh
As of commit 77bba4fcb2d836a58ccf8913d9a514aac6cc49a2. This allows
us to split the widget creation from making it visible.
2019-07-16 18:47:55 +02:00
David Boddie fbdc5f4a93 Stash for sharing 2019-07-16 14:00:41 +02:00
David Boddie e5648a82a3 Remove explicit keycodes in XML, auto-generate them instead
This makes it easier to keep the geometry and symbols files in sync.
2019-07-16 14:00:41 +02:00
Guido Gunther 922495ca06 Merge branch 'remove-unused-files' into 'master'
Remove unused files and functions

See merge request Librem5/squeekboard!79
2019-07-16 07:16:29 +00:00
David Boddie e5e2e08ff4 Merge branch 'fewer-redraws' into 'master'
keyboard: Schedule widget redraw instead of gdk_window_invalidate_rect

See merge request Librem5/squeekboard!75
2019-07-15 22:57:12 +00:00
David Boddie c7c410210b Merge branch 'scale' into 'master'
Honor widget scale  factor

See merge request Librem5/squeekboard!56
2019-07-15 22:27:34 +00:00
David Boddie 6f5f49729c Remove unused files and functions 2019-07-15 23:45:17 +02:00
Guido Günther 94c9442de1 keyboard: Drop now unused clip_bounds_to_dirty_rectangle() 2019-07-15 17:42:32 +02:00
Guido Günther 8c044d0852 keyboard: Schedule widget redraw instead of gdk_window_invalidate_rect
The later would invaliate the drawn area again and again in a ::draw()
handler. This caused infinite redraws when e.g. a key was locked.  To
reproduce break e.g. on `eek_gtk_keyboard_real_draw()` and see how it is
invoked again and again.
2019-07-15 17:42:32 +02:00
Guido Günther 1f0cc0a5f3 keyboard: Don't leak on set_keyboard()
Unref and disconnect signals before setting a new keyboard.
2019-07-15 14:12:10 +02:00
Guido Günther 5693ce3df7 keyboard: Simplify signal disconnect
We're only keeping the signal ids around for disconnect but that only
happens in dispose so it's o.k.to just disconnect all keyboard signals
we listen to.
2019-07-15 14:12:10 +02:00