v0.9.4: added UI support for no update service

This commit is contained in:
Evan Debenham 2021-06-25 17:50:53 -04:00
parent 110a8017f7
commit 0c2434a605

View File

@ -532,7 +532,8 @@ public class WndSettings extends WndTabbed {
chkNews.checked(SPDSettings.news());
add(chkNews);
chkUpdates = new CheckBox(Messages.get(this, "updates")){
if (Updates.supportsUpdates()) {
chkUpdates = new CheckBox(Messages.get(this, "updates")) {
@Override
protected void onClick() {
super.onClick();
@ -542,6 +543,7 @@ public class WndSettings extends WndTabbed {
};
chkUpdates.checked(SPDSettings.updates());
add(chkUpdates);
}
if (!DeviceCompat.isDesktop()){
chkWifi = new CheckBox(Messages.get(this, "wifi")){
@ -562,15 +564,20 @@ public class WndSettings extends WndTabbed {
sep1.size(width, 1);
sep1.y = title.bottom() + 2*GAP;
if (width > 200){
float pos;
if (width > 200 && chkUpdates != null){
chkNews.setRect(0, sep1.y + 1 + GAP, width/2-1, BTN_HEIGHT);
chkUpdates.setRect(chkNews.right() + GAP, chkNews.top(), width/2-1, BTN_HEIGHT);
pos = chkUpdates.bottom();
} else {
chkNews.setRect(0, sep1.y + 1 + GAP, width, BTN_HEIGHT);
chkUpdates.setRect(0, chkNews.bottom()+ GAP, width, BTN_HEIGHT);
pos = chkNews.bottom();
if (chkUpdates != null) {
chkUpdates.setRect(0, chkNews.bottom() + GAP, width, BTN_HEIGHT);
pos = chkUpdates.bottom();
}
}
float pos = chkUpdates.bottom();
if (chkWifi != null){
chkWifi.setRect(0, pos + GAP, width, BTN_HEIGHT);
pos = chkWifi.bottom();