Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Linux sliders are upside down

Đang mở
#314 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Lĩnh vực
desktop

Hướng nghiên cứu

Điểm vào được issue nêu là slider% trên GTK; hãy xác định phần xử lý thanh trượt dọc tại đó và kiểm tra cách thuộc tính inverted của GTK hiện được cung cấp hoặc bị bỏ qua. Xác minh rằng các thanh trượt dọc đặt giá trị cao nhất ở trên cùng trên Linux, đồng thời giữ nguyên hành vi hiện có ở những nơi khác; được xem là hoàn thành khi hành vi tạo ra khớp với quy ước được đề xuất.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

On Linux, a vertical slider% has the lowest value at the top, and the highest value at the bottom, and it visualy 'fills' the slider from the top down. It gets this behavior from GTK's default.

This is backwards from how sliders work on macOS, Qt, Java, Firefox, Chrome, Safari, Edge, light switches on walls, lighting consoles, audio consoles, and every other vertical slider I've encountered. GTK is just weird here. Nobody pushes a slider up and expects a lower volume or less light.

Normally, I'm in favor of cross-platform toolkits following the local conventions, but in this case I don't see any rationale for GTK being the odd one out, and also I haven't found a single GTK application (even among the GTK demos) with a vertical slider, so I don't think there's any real convention to be beholden to. The racket/gui documentation doesn't say which orientation you get, so we wouldn't be breaking any promises to change it.

As with most toolkits, GTK does provide a property to flip the slider vertically (though their own documentation on it is self-contradictory!), but AFAICT it's not exposed by racket/gui so programmers can't use it.

I propose that slider% on GTK set the "inverted" property on vertical sliders so the highest value is on top, as it is everywhere else in the world. My second choice would be to expose such a property in racket/gui's slider% so that applications can choose either "platform native" or "cross-platform consistent".

Ngôn ngữ chính
Racket
Star
68
Fork
83
Merge trung bình
21 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của racket/gui

Tất cả issue của racket/gui

Issue tương tự

Thêm issue về Desktop Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.