1. #1
    Senior Member Follow User Gallery
    Join Date
    May 2007
    Location
    Raleigh NC
    Posts
    484

    Default Plugin UI Issues.

    I recently gave some people a plugin I was working on and someone reported some errors in the interface.



    This is what it's supposed to look like.



    You can see that some of the buttons have been pushed down and some are off menu. The one slider is overlapping another button as well. The buttons that seem affected are ones that have fixed widths (which are almost all of them). Their monitor resolution is 1680*1050 so I didn't think that would be a problem. I asked them if they had some custom interface and they told me they didn't. I am not quite sure what the issue is and I am not really sure how to fix it.

    Any thoughts?

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    The reason is that they have their button size (Preferences>Interface>Button Size) set to a different setting to yours. This affects how the buttons display.

    When coding for plugins it is best to use proportional values for button height and width, rather than actual pixels (so 0.5 for half palette, 0.25 for quarter palette, 1 for whole palette, etc.). This means that your layout will remain as you intend (though it is still worth testing at smaller button widths to check that your button names are still sufficiently readable.)

  3. #3
    Senior Member Follow User Gallery
    Join Date
    May 2007
    Location
    Raleigh NC
    Posts
    484

    Default

    Ah thanks so much. I thought it had something to do with the button or menu width.

    I didn't know you could use proportional values instead of pixels. So if you use a decimal number does it just know you don't mean pixels? How does that work with 1?

  4. #4
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Quote Originally Posted by Nyx702 View Post
    Ah thanks so much. I thought it had something to do with the button or menu width.

    I didn't know you could use proportional values instead of pixels. So if you use a decimal number does it just know you don't mean pixels? How does that work with 1?
    Anything less than or equal to 1 is treated as proportional. Whole numbers above 1 are treated as pixels. I've never tried decimals above 1. These days I always use just proportional values.

  5. #5
    Senior Member Follow User Gallery
    Join Date
    May 2007
    Location
    Raleigh NC
    Posts
    484

    Default

    Thank you so much for you help again. This is really useful.

    Is documented anywhere? It seems like this is something that should be. The wiki specifically says "width in pixels" and nothing about using decimal numbers.

    It's not hard to fix but it's a little frustrating to go back and figure out what all the values should be after the fact.

  6. #6
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Quote Originally Posted by Nyx702 View Post
    Is documented anywhere? It seems like this is something that should be. The wiki specifically says "width in pixels" and nothing about using decimal numbers.
    Good point. I've updated the command reference.

  7. #7

    Default

    I noticed this problem too for me for both MatCap Baker and Tile Helper. It only happens if my button size is set to anything under 40.


  8. #8
    Senior Member Follow User Gallery
    Join Date
    May 2007
    Location
    Raleigh NC
    Posts
    484

    Default

    Thanks for letting me know. I have it fixed for my plugin I just have to get it ready to post. Keep a look out for it on its thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •