mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-22 06:57:51 +00:00
touch_keyboard: tweaks for PinePhone display
This change increases the quota to allow the use of bigger fonts, and tweaks the style such that the keyboard gets a decent appearance on the PinePhone's 1440x720 display.
This commit is contained in:
parent
697d2e86d7
commit
bd8c7f84dd
@ -1,4 +1,4 @@
|
||||
<runtime ram="12M" caps="350" binary="init">
|
||||
<runtime ram="18M" caps="400" binary="init">
|
||||
|
||||
<requires>
|
||||
<gui/>
|
||||
@ -20,9 +20,9 @@
|
||||
<service name="Event"/>
|
||||
</parent-provides>
|
||||
|
||||
<start name="touch_keyboard" caps="250">
|
||||
<start name="touch_keyboard" caps="300">
|
||||
<binary name="touch_keyboard"/>
|
||||
<resource name="RAM" quantum="8M"/>
|
||||
<resource name="RAM" quantum="14M"/>
|
||||
<config min_width="720" min_height="480"/>
|
||||
<route>
|
||||
<service name="ROM" label="layout">
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<map name="lower">
|
||||
<row id="0">
|
||||
<key id="0" label="Esc" code="27"/>
|
||||
<key id="0" label="ES" code="27" small="yes"/>
|
||||
<key id="1" char="1"/>
|
||||
<key id="2" char="2"/>
|
||||
<key id="3" char="3"/>
|
||||
@ -13,7 +13,7 @@
|
||||
<key id="8" char="8"/>
|
||||
<key id="9" char="9"/>
|
||||
<key id="10" char="0"/>
|
||||
<key id="11" label="BS" code="8"/>
|
||||
<key id="11" label="BS" code="8" small="yes"/>
|
||||
</row>
|
||||
<row id="1">
|
||||
<key id="0" char="q"/>
|
||||
@ -28,7 +28,7 @@
|
||||
<key id="9" char="p"/>
|
||||
</row>
|
||||
<row id="2">
|
||||
<key id="0" label="TAB" code="9" min_ex="1"/>
|
||||
<key id="0" label="TAB" code="9" min_ex="1" small="yes"/>
|
||||
<key id="1" char="a"/>
|
||||
<key id="2" char="s"/>
|
||||
<key id="3" char="d"/>
|
||||
@ -41,8 +41,8 @@
|
||||
<key id="11" char=":"/>
|
||||
</row>
|
||||
<row id="3">
|
||||
<key id="0" label="ABC" min_ex="4" map="upper"/>
|
||||
<key id="1" char="/" min_ex="1"/>
|
||||
<key id="0" label="ABC" min_ex="3" map="upper" small="yes"/>
|
||||
<key id="1" char="/"/>
|
||||
<key id="2" char="z"/>
|
||||
<key id="3" char="x"/>
|
||||
<key id="4" char="c"/>
|
||||
@ -50,26 +50,26 @@
|
||||
<key id="6" char="b"/>
|
||||
<key id="7" char="n"/>
|
||||
<key id="8" char="m"/>
|
||||
<key id="9" label="UP" code="0xf700"/>
|
||||
<key id="10" label="RETURN" code="10"/>
|
||||
<key id="9" label="UP" code="0xf700" small="yes"/>
|
||||
<key id="10" label="EN" code="10" small="yes"/>
|
||||
</row>
|
||||
<row id="4">
|
||||
<key id="0" min_ex="2" label=";:/" map="aux"/>
|
||||
<key id="0" min_ex="3" label=";:/" map="aux"/>
|
||||
<key id="1" char="?"/>
|
||||
<key id="2" char="!"/>
|
||||
<key id="8" char=","/>
|
||||
<key id="9" char="."/>
|
||||
<key id="4" char=" " min_ex="8"/>
|
||||
<key id="4" char=" " min_ex="5"/>
|
||||
<key id="3" char="-"/>
|
||||
<key id="5" label="LEFT" code="0xf702"/>
|
||||
<key id="6" label="DOWN" code="0xf701"/>
|
||||
<key id="7" label="RIGHT" code="0xf703"/>
|
||||
<key id="5" label="LF" code="0xf702" small="yes"/>
|
||||
<key id="6" label="DN" code="0xf701" small="yes"/>
|
||||
<key id="7" label="RG" code="0xf703" small="yes"/>
|
||||
</row>
|
||||
</map>
|
||||
|
||||
<map name="upper">
|
||||
<row id="0">
|
||||
<key id="0" label="Esc" code="27"/>
|
||||
<key id="0" label="ES" code="27" small="yes"/>
|
||||
<key id="1" char="1"/>
|
||||
<key id="2" char="2"/>
|
||||
<key id="3" char="3"/>
|
||||
@ -80,7 +80,7 @@
|
||||
<key id="8" char="8"/>
|
||||
<key id="9" char="9"/>
|
||||
<key id="10" char="0"/>
|
||||
<key id="11" label="BS" code="8"/>
|
||||
<key id="11" label="BS" code="8" small="yes"/>
|
||||
</row>
|
||||
<row id="1">
|
||||
<key id="0" char="Q"/>
|
||||
@ -95,7 +95,7 @@
|
||||
<key id="9" char="P"/>
|
||||
</row>
|
||||
<row id="2">
|
||||
<key id="0" label="TAB" code="9" min_ex="1"/>
|
||||
<key id="0" label="TAB" code="9" min_ex="1" small="yes"/>
|
||||
<key id="1" char="A"/>
|
||||
<key id="2" char="S"/>
|
||||
<key id="3" char="D"/>
|
||||
@ -108,8 +108,8 @@
|
||||
<key id="11" char=":"/>
|
||||
</row>
|
||||
<row id="3">
|
||||
<key id="0" label="abc" min_ex="4" map="lower"/>
|
||||
<key id="1" char="/" min_ex="1"/>
|
||||
<key id="0" label="abc" min_ex="3" map="lower" small="yes"/>
|
||||
<key id="1" char="/"/>
|
||||
<key id="2" char="Z"/>
|
||||
<key id="3" char="X"/>
|
||||
<key id="4" char="C"/>
|
||||
@ -117,26 +117,26 @@
|
||||
<key id="6" char="B"/>
|
||||
<key id="7" char="N"/>
|
||||
<key id="8" char="M"/>
|
||||
<key id="9" label="UP" code="0xf700"/>
|
||||
<key id="10" label="RETURN" code="10"/>
|
||||
<key id="9" label="UP" code="0xf700" small="yes"/>
|
||||
<key id="10" label="EN" code="10" small="yes"/>
|
||||
</row>
|
||||
<row id="4">
|
||||
<key id="0" min_ex="2" label=";:/" map="aux"/>
|
||||
<key id="0" min_ex="3" label=";:/" map="aux"/>
|
||||
<key id="1" char="?"/>
|
||||
<key id="2" char="!"/>
|
||||
<key id="8" char=","/>
|
||||
<key id="9" char="."/>
|
||||
<key id="4" char=" " min_ex="8"/>
|
||||
<key id="4" char=" " min_ex="5"/>
|
||||
<key id="3" char="-"/>
|
||||
<key id="5" label="LEFT" code="0xf702"/>
|
||||
<key id="6" label="DOWN" code="0xf701"/>
|
||||
<key id="7" label="RIGHT" code="0xf703"/>
|
||||
<key id="5" label="LF" code="0xf702" small="yes"/>
|
||||
<key id="6" label="DN" code="0xf701" small="yes"/>
|
||||
<key id="7" label="RG" code="0xf703" small="yes"/>
|
||||
</row>
|
||||
</map>
|
||||
|
||||
<map name="aux">
|
||||
<row id="0">
|
||||
<key id="0" label="Esc" code="27"/>
|
||||
<key id="0" label="ES" code="27" small="yes"/>
|
||||
<key id="1" char="1"/>
|
||||
<key id="2" char="2"/>
|
||||
<key id="3" char="3"/>
|
||||
@ -147,7 +147,7 @@
|
||||
<key id="8" char="8"/>
|
||||
<key id="9" char="9"/>
|
||||
<key id="10" char="0"/>
|
||||
<key id="11" label="BS" code="8"/>
|
||||
<key id="11" label="BS" code="8" small="yes"/>
|
||||
</row>
|
||||
|
||||
<row id="1">
|
||||
@ -196,12 +196,12 @@
|
||||
</row>
|
||||
|
||||
<row id="4">
|
||||
<key id="0" min_ex="2" label="abc" map="lower"/>
|
||||
<key id="0" min_ex="3" label="abc" map="lower"/>
|
||||
<key id="1" char=""/>
|
||||
<key id="2" char=""/>
|
||||
<key id="8" char=""/>
|
||||
<key id="9" char=""/>
|
||||
<key id="4" char="" min_ex="8"/>
|
||||
<key id="4" char="" min_ex="5"/>
|
||||
<key id="3" char=""/>
|
||||
<key id="5" char=""/>
|
||||
<key id="6" char=""/>
|
||||
|
@ -49,7 +49,7 @@ struct Touch_keyboard::Main : Sandbox::Local_service_base::Wakeup,
|
||||
Registry<Child_state> _children { };
|
||||
|
||||
Child_state _menu_view_child_state { _children, "menu_view",
|
||||
Ram_quota { 4*1024*1024 },
|
||||
Ram_quota { 10*1024*1024 },
|
||||
Cap_quota { 200 } };
|
||||
/**
|
||||
* Sandbox::State_handler
|
||||
|
@ -48,6 +48,8 @@ void Dialog::produce_xml(Xml_generator &xml)
|
||||
xml.node("label", [&] () {
|
||||
xml.attribute("name", "label");
|
||||
xml.attribute("text", key.label);
|
||||
if (key.small)
|
||||
xml.attribute("font", "annotation/regular");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -68,6 +68,8 @@ struct Touch_keyboard::Dialog : private Dynamic_rom_session::Xml_producer
|
||||
|
||||
unsigned min_ex = 0;
|
||||
|
||||
bool small = false;
|
||||
|
||||
Key(Id id) : _id(id) { }
|
||||
|
||||
bool matches(Xml_node const &node) const { return _id == id_attr(node); }
|
||||
@ -80,6 +82,7 @@ struct Touch_keyboard::Dialog : private Dynamic_rom_session::Xml_producer
|
||||
emit = { };
|
||||
map = key.attribute_value("map", Map());
|
||||
min_ex = key.attribute_value("min_ex", 0U);
|
||||
small = key.attribute_value("small", false);
|
||||
|
||||
if (key.has_attribute("char")) {
|
||||
label = key.attribute_value("char", Label());
|
||||
|
Loading…
Reference in New Issue
Block a user