sculpt: avoid stretched radio icon in wifi ap list

This commit is contained in:
Norman Feske 2023-04-06 12:49:46 +02:00 committed by Christian Helmuth
parent 54d7a48c9b
commit 014066f15b

View File

@ -22,13 +22,14 @@ using namespace Sculpt;
void Network_dialog::_gen_access_point(Xml_generator &xml,
Access_point const &ap) const
{
gen_named_node(xml, "hbox", ap.bssid, [&] () {
gen_named_node(xml, "hbox", ap.bssid, [&] {
gen_named_node(xml, "float", "left", [&] () {
gen_named_node(xml, "float", "left", [&] {
xml.attribute("west", "yes");
xml.node("hbox", [&] () {
gen_named_node(xml, "button", "button", [&] () {
xml.node("hbox", [&] {
gen_named_node(xml, "float", "left", [&] {
gen_named_node(xml, "button", "button", [&] {
xml.attribute("style", "radio");
if (_wifi_connection.connected())
@ -36,13 +37,14 @@ void Network_dialog::_gen_access_point(Xml_generator &xml,
else
_ap_item.gen_button_attr(xml, ap.bssid);
xml.node("hbox", [&] () { });
xml.node("hbox", [&] { });
});
});
gen_named_node(xml, "label", "ssid", [&] () {
gen_named_node(xml, "label", "ssid", [&] {
xml.attribute("text", String<20>(" ", ap.ssid)); });
gen_named_node(xml, "label", "protection", [&] () {
gen_named_node(xml, "label", "protection", [&] {
xml.attribute("font", "annotation/regular");
if (ap.protection == Access_point::WPA_PSK)
xml.attribute("text", " (WPA) ");
@ -52,9 +54,9 @@ void Network_dialog::_gen_access_point(Xml_generator &xml,
});
});
gen_named_node(xml, "float", "right", [&] () {
gen_named_node(xml, "float", "right", [&] {
xml.attribute("east", "yes");
xml.node("label", [&] () {
xml.node("label", [&] {
xml.attribute("text", String<8>(ap.quality, "%")); });
});
});