Add JonaOS widgets - #5270
Conversation
|
Thanks for the pull request! This repository uses a two-stage review: an AI review that you run yourself, followed by a human review. To get started, comment See the pull request review process for the full details. |
|
/ai-review |
Submission reviewNote: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. Compared to the previous submission the file changed in exactly three places: a README line, the small-button/round-shortcut sizes and font sizes, and a 1. Display scaling is still ignored, so the widgets are the wrong size on any scaled monitor. This was item 1 of the previous review and the maintainer's explicit follow-up question ("Any reason not to add DPI support according to the suggestion in review note 1?"). void UpdateScale() {
int sw = GetSystemMetrics(SM_CXSCREEN);
int sh = GetSystemMetrics(SM_CYSCREEN);
if (sw >= 1920 && sh >= 1080) {
g_scale = 1.0f;Nothing reads the monitor DPI, and The closest existing mod — also a DWORD WINAPI UiThreadProc(LPVOID) {
SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
...void UpdateScale() {
...
UINT dpi = g_hwnd ? GetDpiForWindow(g_hwnd) : 96; // or GetDpiForMonitor on the primary monitor
g_scale *= (dpi ? dpi : 96) / 96.0f;
}If there's a reason you'd rather not do this, that's worth saying explicitly in the PR rather than leaving it open a second time. 2. The text-readability fix doesn't reach the actual cause — a global 0.75× shrink is applied to every font. The font bumps in this revision (round shortcuts
The Windows shell UI font is 9 pt Segoe UI = 12 device px at 100% scaling, so every string in the mod is still below standard UI text size — which is what the screenshot in the previous PR was showing. Either drop 3. The new README line advertises a feature the mod doesn't implement. There is no case WM_MOUSEWHEEL: {
POINT screenPt = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
if (HitTestWidget(LogicalPointFromScreen(screenPt)) == WidgetVolume) {
SetSystemVolume(g_volumeLevel + GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA * 0.02f);
Render();
return 0;
}
break;
}or reword the sentence to describe the drag. Two smaller things on the same line: it starts with 4. The volume-slider hit test still runs before the widget hit test, so a widget dragged over the slider changes the volume instead. Unchanged from the previous review: case WM_LBUTTONDOWN: {
PointF pt = LogicalPointFromLParam(lParam);
RectF slider = VolumeSliderRect();
if (PtInRectF(slider, pt)) {
g_draggingSlider = true;
SetCapture(hwnd);
SetSystemVolume(...);
return 0;
}
int hit = HitTestWidget(pt);
int hit = HitTestWidget(pt);
if (hit == WidgetVolume && PtInRectF(VolumeSliderRect(), pt)) {
g_draggingSlider = true;
...
}5. Two of the three Show-Desktop guards ( Also unchanged. Guard 1 (
Add a Optional improvements
Minor polish — none of this affects users, so it's your call. These all carry over unchanged from the previous review.
Functionality notes
Non-critical observations and ideas about the feature behavior itself. These also carry over from the previous revision, plus one new one at the top.
Next steps:
See the review process for details. |
Mod authorship
If this pull request introduces a new mod, please complete the section below.
This mod was created by:
Please select the options that best apply. Your selection does not affect the acceptance criteria, but it helps reviewers understand the context of the code and provide relevant feedback.