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

Position of application icon is changing based on position of hidden files

Đang mở
#225 3 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
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, macos
Lĩnh vực
desktop

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện ba cấu hình trong issue bằng nội dung appdmg.json được cung cấp, rồi so sánh vị trí biểu tượng ứng dụng khi AppleShowAllFiles được bật và tắt. Trước tiên, hãy đọc các thiết lập định vị nội dung và kích thước cửa sổ; hoàn tất có nghĩa là xác định lý do vị trí đã cấu hình thay đổi và giữ nguyên vị trí đó khi các mục ẩn được di chuyển ra ngoài vùng hiển thị.

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

Mô tả

Our team is experiencing weird behaviour with only application icon shown in visible area. When the hidden icons are moved to the right out of the visible area following happens:

  1. If the icons are hidden, the icon position is as defined in appdmg.json
  2. If user has com.apple.finder "AppleShowAllFiles" set to true or simply hit the CMD+Shift+. then the position of icon is shifted.

We thought that this is issue with the appearing scrollbar, but the shift is too big, scrollbar is only few dozens pixels wide and shift is hundred or even more(did not measure exactly). We also tried to move icons down under the visible area. The icon moves counterintuitively to the right closer to the scrollbar. Is there something we are doing wrong in appdmg.json file?

DMG when com.apple.finder "AppleShowAllFiles" is true and and hidden icons are under the visible area
HiddenDown

Here is the content of the appdmg.json file

{
  "title": "App",
  "icon": "icon.icns",
  "background": "background.png",
  "background-color": "mintcream",
  "icon-size": 96,
  "window": {
    "position": { "x": 200, "y": 200 },
    "size": { "width": 400, "height": 400 }
  },
  "contents": [
    { "x": 200, "y": 200, "type": "file", "path": "App.app" },
    { "x": 0, "y": 600, "type": "position", "path": ".background" },
    { "x": 0, "y": 600, "type": "position", "path": ".DS_Store" },
    { "x": 0, "y": 600, "type": "position", "path": ".Trashes" },
    { "x": 0, "y": 600, "type": "position", "path": ".VolumeIcon.icns" }
  ]
}

DMG when com.apple.finder "AppleShowAllFiles" is true and hidden icons are right to visible area
HiddenRight

Here is the content of the appdmg.json file

{
  "title": "App",
  "icon": "icon.icns",
  "background": "background.png",
  "background-color": "mintcream",
  "icon-size": 96,
  "window": {
    "position": { "x": 200, "y": 200 },
    "size": { "width": 400, "height": 400 }
  },
  "contents": [
    { "x": 200, "y": 200, "type": "file", "path": "App.app" },
    { "x": 600, "y": 0, "type": "position", "path": ".background" },
    { "x": 600, "y": 0, "type": "position", "path": ".DS_Store" },
    { "x": 600, "y": 0, "type": "position", "path": ".Trashes" },
    { "x": 600, "y": 0, "type": "position", "path": ".VolumeIcon.icns" }
  ]
}
DMG when com.apple.finder "AppleShowAllFiles" is false
OK
Ngôn ngữ chính
JavaScript
Star
1.7k
Fork
155
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 LinusU/node-appdmg

Tất cả issue của LinusU/node-appdmg

Issue tương tự

Thêm issue về JavaScript

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.