Center Save & Activate APN button label in xnetworks APN editor
- Dynamically center the "Save & Activate APN" button label in NetModal::ApnEditor using pangoTextWidth(layoutMain, ...) instead of a hardcoded x = 50 offset in src/dwm-plugins/networks_plugin.cpp - Rebuild DWM plugins via scripts/build-dwm-plugins.sh and sync networks.so across prebuilt/ and overlay/rootfs/ - Update Unreleased CHANGELOG.md notes and rebuilt --mkinitfs image SHA-256 checksums across all four targets in scripts/check-rebuild.sh
This commit is contained in:
1 parent
601aaca25c
commit
c529463ae3
5 files changed
+22
-17
No files matched your search
@@ -1915,10 +1915,15 @@ int runNetworksApp(int argc, char** argv) {
|
||||
}
|
||||
|
||||
bool saveSel = (apnFieldSel == 3);
|
||||
const int btnX = 18;
|
||||
const int btnW = kWinWidth - 36;
|
||||
XSetForeground(dpy, gc, saveSel ? pt.spec.selBg : pt.spec.bgButton);
|
||||
XFillRectangle(dpy, pix, gc, 18, 202, kWinWidth - 36, 26);
|
||||
XFillRectangle(dpy, pix, gc, btnX, 202, btnW, 26);
|
||||
const char* saveLabel = "Save & Activate APN";
|
||||
int saveTw = pangoTextWidth(layoutMain, saveLabel);
|
||||
int saveTx = btnX + std::max(4, (btnW - saveTw) / 2);
|
||||
drawPango(layoutMain, saveSel ? &colWhite : &colGreen,
|
||||
50, 202, 26, "Save & Activate APN");
|
||||
saveTx, 202, 26, saveLabel, btnW - 8);
|
||||
|
||||
drawSoftkeyBar("Save", "Select", "Cancel");
|
||||
} else if (modal == NetModal::BtActions) {
|
||||
|
||||
Reference in new issue
Block a user