aMSN Forums
June 20, 2013, 08:54:30 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Skinning Questions (to programmers)  (Read 4084 times)
mejogid
Newbie

Offline Offline

Posts: 10


View Profile
« on: May 25, 2008, 11:10:55 pm »

I'm currently working on a significant (as in redesigning from scratch) upgrade to my "Midnight" theme (already posted here) with the hope of fulfilling user requests and my own plans, and am very pleased with the progress so far.  I appreciate that some of these questions may appear stupid, but unfortunately don't have time to familiarise myself with Tk or the amsn source.  Essentially, my key problems are:

    1. The login button has a 2 pixel border along its top and left hand side, and there doesn't seem to be an option to change this.  Having briefly looked in login_screen.tcl I have found the code for drawing the button but no reference to such a border - is there anyway to remove it?
    2.  The Combo Box at the bottom of the contact list appears to be a different widget to the one used on the login page and has a different kind of border - is there anyway to remove this sunken effect?  (Minor, I suppose, but it does stick out a bit)
    3.  The "header" of the contact list - with the display picture and status etc. - doesn't seem to be at all themeable - I've worked around this in my design, but it would open up a lot more possibilities if there was a way to use a background image.  Unfortunately this would seem to require changes to the background of the inbox indicator text.
    4.  On linux (but not OS X), the buttons of the chat window appear misaligned - there's a 1 pixel gap between buttons whereas there is none on OS X, and the wink & nudge buttons are 1 pixel higher.
    5.  The resizing bar between the upper and lower portions of the chat window - this currently really stands out (a black, 1 pixel line beneath a light grey one)
    6.  I seem to remember on an oldish version of debian & an older version of amsn there was a way to actually theme the toolkit (ie. the preference windows, etc) - is there any officially supported way to do this, besides the colouring Nuitari's patches allow?
   ---
[   7.  Completely superfluous and probably not possible without big performance improvements in the toolkit, but it would look extremely good if there was a way for each contact group to slide down as the header was clicked.  ]

I'd really appreciate any pointers from anyone familiar with the source, and do think that the benefits to skinners these changes would bring would be immense.  Equally, I understand the project has far more important goals such as reverse engineering a proprietary protocol.

Cheers in advance for any help,
mejogid

------------
Edit:  A summary of platform differences (on 0.98) which can be problematic:
-  Linux has mis-aligned toolbar buttons in chat windows.
-  Linux has a 2 pixel border on the top & left of the login button - no other platform does.
-  Windows has a 2 pixel border on the top & left of checked chek boxes - no other platform does.
-  OS X forces "native" check boxes, but they have a large black box surrounding them and just seem to be PNGs.
-  Windows forces native menu bars, but uses non-native menus.
-  OS X has a bulky border around the single-pixel black border of the login screen combo box (but not on the contact list)
-  OS X has abysmal peformance with transparent images.
-  OS X and Windows display some transparent PNGs with a black/white background (edit: it seems likely this is merely a case of SVN revision used, with newer ones working correctly edit2: changing no libraries but updating aMSN on Windows fixes it, the same process on OS X doesn't).
    -  Black background - http://img256.imageshack.us/img256/5733/bonlinegl0.png (saved from OS X preview)
    -  White background - -n http://img156.imageshack.us/img156/4935/bhiddenxg7.png (after using imagemagick on an inkscape PNG - I'll test to see if this occurs without the use of imagemagick)

I don't really know enough to pinpoint which of these are aMSN problems and which are toolkit problems.  As such, this is really just a list to keep track of cosmetic variations that may be of use to skinners/developers.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #1 on: May 26, 2008, 03:18:43 am »

Hi,
just so you know, you can do a 'grep skin::setKey gui.tcl' (or manually search for all the skin::setKey in gui.tcl) to find all the possible skin keys.
1 - loginbuttonx and loginbuttony are used to specify the 'border' in the pixmap, the center gets resized while the pixels on the border don't.
2 - you're right, the combobox in the login screen have a '-relief solid' option, while the one in the main window has a '-relief sunken'... I'm not sure which one fits best... I think the border you get in the login screen is nice, and having no border in the main window is nice... not sure what should be done.. change it, make them all the same.. or add a skin option for the relief to use for those comboboxes...
3 - yeah, afaik, you can only set a background color there, not a background image, if we want to have a bg image, we would need to rewrite that code and make it into a canvas, like we did for the contact list.. a lot of work.. maybe not worth it...
4 - on mac os x those buttons are actually labels, that might be why there's a difference... there's a bug with TkAqua if we use a real button and put an image on it... so we have a hack to use a label. The wink and nudge buttons are not 'core' buttons, they are from a plugin, the image in the plugin might be slightly different, or maybe the way the plugin adds the buttons is different from how the core adds them. I don't see that difference though on windows....
5 - that's called the 'sash', you can remove it if you change its width to 0, but then it becomes ugly/bad because a user doesn't see the sash anymore so he won't know that he can resize those parts...
default values (from gui.tcl) :
Code:
::skin::setKey chat_sash_width 2
::skin::setKey chat_sash_relief raised
::skin::setKey chat_sash_showhandle 0
::skin::setKey chat_sash_pady 0


6 - that was the chameleon plugin, it still works, but only if you use tcl/tk 8.4.. but we don't officially support it (since it's a plugin) ... I wrote it but I don't use it so I don't give any support for it anymore (so if it bugs, not my problem)... there's a thread about it in the plugins section
7 - yeah, I agree.. planned for amsn2, but for the current one, it would be, difficult to do and a performance hug.

humm.. about your platform differences, this looks interesting.. I'm not much into UI stuff, so I don't know (and don't care:p) but it does make sense that there might be a few small differences from one platform to another...
About OSX handling badly the transparent pngs... that could maybe explain why some mac users complain about performance...
we should probably have a 'minimalistic' skin that would help optimize the execution... (no transparency, no group boxes, no scalable backgrounds, etc...)

hope this helps! Smiley
Logged

KaKaRoTo
mejogid
Newbie

Offline Offline

Posts: 10


View Profile
« Reply #2 on: May 26, 2008, 10:41:03 am »

Thanks for the tip, I've been grepping through the entire directory which obviously results in a tonne of repeated/redundant keys.

1.  Unless there's something wrong with the PNGs I've been using (I'll look into it), this is the behavior on OS X and Windows - on *nix, there's an additional 2 pixel border in one of the background colours around the left and top sides, as if the button isn't being drawn to full size.  I'll check again with the latest SVN/older versions and see if I can narrow it down.
2.  I do think a couple of skin keys for this would be useful - for example, at the bottom of the chat window I'm trying to create a smooth, unified feel that currently has a sunken combobox in it.  A borderwidth 0 option would solve that.
3.  Sure, I can see how that's not worth the effort for a pretty background image.
4.  Sorry, seems like that's another linux specific bug (just fired up a dusty Windows VM and can't replicate it).  I'll see if I can figure out how to force it to use the OS X method, and see if that solves it.
5.  I'm guessing there's no easy way to replace it with a 2 pixel tall, horizontally tiled image?  If not, it's nothing major and those options can probably help improve it.  Edit: if it's hidden, you get the impression that it's the bottom of the chat window's top half that's being dragged, which does make some intuitive sense.
6.  Right, I can certainly see why it's not worth updating when the user rarely sees it.
7.  Cool - has the development for that started or is it just a drawing board?  I'd love to help with any skinning work.

Good points - I'm planning to make a cut-down version, and will see how I can get the best performance comprimise (first generation macbook pro, which is probably about middle of the range by now).

Thanks a lot for the pointers, and even more so for your work on aMSN.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!