Skip to content

Prepare NatTable to work correctly with changed scaling in SWT #172

Closed
2 of 2 issues completed
Closed

Description

@fipro78

The current SWT implementation updated the scaling API to support multi-device usage and scale according to the current active display. NatTable has implemented its own scaling mechanism that relies on Display.getDPI(). That method was deprecated in current implementations, therefore NatTable needs to update its implementation to also work with future SWT versions and to support the multi-display scenarios.

The following topics should be addressed:

  • Replace the usage of Display.getDPI()
  • Add a ZoomChangedListener

Additionally it would be beneficial to change the NatTable internal icons to SVGs, which are now supported in SWT. This would improve the dynamic scaling feature in NatTable that was introduced with #132

There are already some information collected in this discussion: #164

Activity

  1. JR-1993 commented on Nov 22, 2025

    @JR-1993
    Contributor

    Do you already have all icons as SVGs? If not I would offer my help creating them.

  2. fipro78 commented on Nov 22, 2025

    @fipro78
    ContributorAuthor

    No, I don't have the icons as svg yet. Any help would be great!

  3. JR-1993 commented on Nov 22, 2025

    @JR-1993
    Contributor

    Here is a litte peek preview:

    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image

    For the "up" "down" "right_down" "right" "left" "vertical_resize" and "horizontal_resize" I will take currentColor. I'm not quite sure if this will work, but if so, then we will not need any inverse icons, because the font color will be taken.

  4. fipro78 commented on Dec 9, 2025

    @fipro78
    ContributorAuthor

    Sorry for the late feedback. They look nice. I will see how to integrate them correctly. Do you plan to share the missing ones also?

  5. JR-1993 commented on Dec 9, 2025

    @JR-1993
    Contributor

    Thank you. Yes, I plan to do so. I need a bit more time but I should be able to deliver all missing ones until christmas. Here are some more to preview.

    Please note that all icons will now have the same size with 24x24px.
    This is different to the sizes of the pngs. Resizing them is done fast by changing the width and height in the svg files. Eclipse Platform uses 24x24 and 16x16. We will have to see how the look and feel is when using them and resize them when required.

    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image
    Image

    For the chevrons (up, down, left, right) I will not duplicate the icons for the different sizes. Its best to use the scaling of these icons for different sizes. I think for example 'up' and 'down' are used in different sizes when sorting by multiple columns.

  6. fipro78 commented on Dec 10, 2025

    @fipro78
    ContributorAuthor

    Thanks a lot! And no pressure, I am not planning to work on this very soon. I was just curious. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions