Old 04-22-2013, 09:42 AM   #1
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,025
Default Another toolbar oddity?

I wanted to put the Undo and Redo button on my MIDI toolbar (in my own, unpublished, theme).

The .png files are 90x30 pixels; each button is actually 28x28 with a boundary of transparent pixels. They look correct in the Main toolbar. I have both "Don't scale" preferences set, so they are always the same size.

When I use them in the MIDI Editor toolbar, the image is rendered as 29 pixels high - have a look at the lower Undo button in the magnified screenshot. To get them to be displayed correctly I had to change them to be 92x32 and add pink corners - as I have done for the lower Redo button.

BUT, I did not have to do this for the other buttons, e.g. the Snap to Grid button which is 90x30, no pink, in both toolbars.

Has anybody got any idea what I've got wrong?

__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 04-22-2013, 09:29 PM   #2
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,081
Default

DS... now that seems very strange...

I use many custom icons in the midi ed. toolbar and they are the same as used in all other toolbars and seem correct... but that is my own CIRCUS theme...

so just to dbl think this with you... what happens if you swap your icons into a testing copy of the default theme? Do they give the same problems????

One other thing comes to mind. I can't really explain the 'why' of this... but..

At one time I wanted to have 'knobless' sends in the MCP....
So I took the knob png and made it invisible by using something like 1% transparency in photoshop...

then took the png that normally shows the amount of send [the colored bar] and worked like crazy on that. Tweaking one px at a time... because I wanted it to show a blue bar BUT when going over 0 db, to show red. See, the red would only be visible in the area where the 'knob' is at the extreme right end.

OK... after spending much time on this, I got it working on my pc of the time. Kewl I thought. BUT NOT... because as soon as I put the theme on a diff. computer and monitor, it did not work right. And I still don't really know why.
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva/angel-rain
hopi is offline   Reply With Quote
Old 04-23-2013, 01:39 AM   #3
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,025
Default

You're onto something there.

Here are my original (90x30, no pink) icons in the Default 4 theme:



You'll see that they appear different (wrong) in the MIDI Editor toolbar. Attached are my original and revised Redo buttons so you can try it out. You'll need to rename them.

I am clearly missing something and despite WhiteTie's best efforts in the past on related issues I cannot grasp how to get this right.
Attached Files
File Type: zip redo_DS.zip (2.7 KB, 53 views)
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 04-23-2013, 03:33 AM   #4
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 2,564
Default

I don't know if it is or is not relevant, but your images are 72.009dpi (a common problem, just google 72.009) and that can cause all manner of oddness.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 04-23-2013, 04:15 AM   #5
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,025
Default

Thanks you WT. Yep, they are (not something I've ever selected). But, the other icons (e.g. the Snap to Grid in the first screenshot are 72.009 too.

I'll try out changing it later.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 04-23-2013, 10:14 AM   #6
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,025
Default

Thank you White Tie. I don't think that it's down to the 72.000 resolution (I tried to change it using The GIMP and it changed on-screen, but when Exported as a .png ifle and reloaded it was back to 72.009.

--------------------------------

Ok, forget the button in my own theme for the moment. I tried a couple of things with the v4 Default theme.

I took the 2 Snap toolbar buttons and the Undo toolbar button and added a coloured boundary to each one. As I used The GIMP, the revised .png files now have a 72.009 resolution.

This first pic shows them appearing as intended in the Main toolbar. However in the MIDI Editor toolbar, the Snap button is OK (I used a yellow boundary for the Snap Off image) but the Undo button is not - the 30th row of pixels is missing and it is a different colour (overlaid by the composite_overlay image?).



As an experiment, I then used the Snap image for the Grid button - you will see that it is 1 pixel low, the 30th row of pixels is missing and it is a different colour. So, with the same image file, I get 2 different appearances.




In this pic, I switched on Snap - so the Snap_On image is used (I used a green boundary colour) and that is as expected. I also switched on the Grid button - it is still 1 pixel low, the 30th row of pixels is missing, and the boundary is not green (I think it is using the third image from the Snap Off png file).



I can't quite articulate what's going on, but it's all a bit funky.

Attached are the three modified buttons, for experimentation.
Attached Files
File Type: zip toolbar_DS.zip (7.8 KB, 49 views)
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 04-23-2013, 08:07 PM   #7
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,081
Default

DS... well let's see if this does anything...

the zip has your pngs reset to true 72 dpi. Otherwise unchanged.
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva/angel-rain

Last edited by hopi; 04-23-2017 at 03:41 PM.
hopi is offline   Reply With Quote
Old 04-24-2013, 01:17 AM   #8
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 2,564
Default

OK, I can confirm that there is unexpected oddness when you use the images from special stock toolbar buttons as custom toolbar images.

* Glib fix : Don't do that.
* Bug fix cures all : The positioning could be fixed, it is a bug after all, but you'd still have the composite overlay spoiling the party, so even after the fix had been actioned my advice would remain : don't do that. So its not the most compelling bug fix

------------------------------

"But wait!" I hear you cry, "I was quite reasonably trying to put a stock toolbar button in a different location, the ME." In the case of undo, that's fine, it has no special behaviour : click to do. But others have on/off states and one even (grrrr) has three states. And that stuff doesn't work when reused elsewhere.

So I would suggest an FR : when you pull a special stock toolbar button into a custom location, it could notice its special-ness, grab its stock image and do its special behaviour.

...which would be what the user wanted in the first place (for a woo slickness win) and would render the positioning error irrelevant.

------------------------------

But, hang on, if we're FRing, lets actually think this through.
  • The stock toolbar buttons have legacy behaviours that are not compatible with the more modern custom toolbar buttons, on both a theme-image and user-interaction level. Inconsistency bleh.
  • This trips up themers, who should be the folks who understand it.
  • This trips up users, who shouldn't be expected or required to understand it.
  • the 3 state button (ripple edit) doth grievous offend my professional sensibilities. 3 states is not a button, its a spinner / dropdown / other thing.
Setting theme&interaction behaviour, setting how images are used, fixing up legacy behaviours without breaking backwards compatibility, opening up potential for enhanced future use with reduced dev load ...we've been here before. A solution was generated that could apply here too. WALTER

So that would be my FR : WALTER of the toolbar behaviour (not positioning etc, yet).
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 04-24-2013, 01:54 AM   #9
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,025
Default

Quote:
Originally Posted by hopi View Post
DS... well let's see if this does anything...

the zip has your pngs reset to true 72 dpi. Otherwise unchanged.
Thank you, for doing that; in the theme they look the same as mine (and they show up as 72.009 in The GIMP - maybe it's some sort of binary/decimal precision issue).
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 04-26-2013 at 02:25 AM.
DarkStar is offline   Reply With Quote
Old 04-24-2013, 09:00 AM   #10
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,025
Default

I've stopped trying to reuse the stock ("factory") toolbar button images. Instead I copy and edit and use the copies on the other buttons. I have to make them brighter / lighter to counteract the effect of the composite_overlay.png (as far as I can tell, this is applied to all button except the stock buttons).

It would have been better if the overlay were applied to all button images, but that would require all themers to rework all their stock buttons. Too much work.

And it would have been better if all buttons were handled in the same way
-- for an "ordinary" button use the three images in the file
-- for a button with On and Off image files, take the images from both files as needed.
-- as for Ripple Edit - that's always going to be special

Now, the issue of the misplaced buttons remains.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 04-24-2013, 09:03 AM   #11
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,025
Default

After some CSI-style forensic analysis, channelling David Caruso with his head bent and looking quizzical over my shoulder ....

I think I might have found the problem

-------------------
Have a look at the left-hand screenshot below:
-- I removed the composite_overlay file to prevent the colour changes
-- I made 4 Undo buttons in the MIDI Editor toolbar and mapped a different image file to each one.
-- the only one that looks correct is the third one, it was 92x32 pixels with Power of Pink corners.
-- the other three were 1 pixel low and only 29 pixels high
-- the text in the "text icon" buttons was 1 pixel adrift too.

Then, I removed the toolbar_blank.png file - the result is the top-right screenshot
-- all four buttons look correct.
-- but I'm not sure where the "text icon" buttons found a background image

I edited toolbar_blank.png and made it a 90x30, no pink image file. The result is in the lower-right screenshot
-- again all 4 look OK.



So the problem seems to be the combination of 90x30 image files with a 92x32, Power of Pink toolbar_blank.png file. Can you confirm that?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 04-24-2013, 06:59 PM   #12
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,081
Default

NICE detective work Columbo! ...but just one more thing..

I think you have confirmed it more than enuff... so we gotta watch out for that blank png size... makes good sense to me.
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva/angel-rain
hopi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.