%button layout/sizing bug
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- macos
- Lĩnh vực
- desktop
Hướng nghiên cứu
Bắt đầu bằng cách chạy bản tái hiện %button and horizontal-panel% được cung cấp trên macOS 13.2.1, sau đó theo dõi hành vi về kích thước và lề của nút. Công việc được xem là hoàn tất khi các nút nhiều dòng không còn nhận chiều rộng tối thiểu quá mức, có thể thu hẹp đến mức nội dung cho phép và vẫn giữ lề gọn gàng tương đương với các nút một dòng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The following demonstrates a subtle %button layout/sizing bug, which results in multi-line %button's being wider, and given proportionately less horizontal margin, than its single-line counterpart.
(when run under macos 13.2.1)...
#lang racket/gui
(define dialog (instantiate dialog% ("X")))
(define hpanel-1 (new horizontal-panel% [parent dialog] [horiz-margin 0]))
(new button% [parent hpanel-1] [label "X"]) ; much wider than it need be
(new button% [parent hpanel-1] [label "X"])
(new button% [parent hpanel-1] [label "X"])
(define hpanel-2 (new horizontal-panel% [parent dialog] [horiz-margin 0]))
(new button% [parent hpanel-2] [label "XXXX"]) ; max text prior to stretching
(new button% [parent hpanel-2] [label "XXXX"])
(new button% [parent hpanel-2] [label "XXXX"])
(define hpanel-4 (new horizontal-panel% [parent dialog] [horiz-margin 0]))
(new button% [parent hpanel-4] [label "X\nX"]) ; wider with less margin
(new button% [parent hpanel-4] [label "X\nX"])
(new button% [parent hpanel-4] [label "X\nX"])
(define hpanel-5 (new horizontal-panel% [parent dialog] [horiz-margin 0]))
(new button% [parent hpanel-5] [label "XXXXX\nXXXXX"]) ; max text prior to stretching
(new button% [parent hpanel-5] [label "XXXXX\nXXXXX"])
(new button% [parent hpanel-5] [label "XXXXX\nXXXXX"])
(send dialog show #t)
I personally prefer the less default margin associated with the multi-line %button; but would also strongly prefer their min-width be reduced to being no larger the min-height of the button (for a single line button), and thereby can be as small as required to be square and display a single character (or Nx1 chars for multi-line buttons, and thereby be N x taller than wide); and the horiz-margin around the label be reduced to be only slightly more than apparently allocated for its vert-margin, seemingly being only a few pixels or so (or whatever required to enable the smallest square button to cleanly display a single character).
This is related to the prior feature request #290.
- Ngôn ngữ chính
- Racket
- Star
- 68
- Fork
- 83
- Merge trung bình
- 9 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của racket/gui
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
farion1231/cc-switch#8863 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dioxus-desktop on macOS: Finder file drops never fire `ondrop` — `dragenter` is not cancelledĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
DioxusLabs/dioxus#6006 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100