PDA

View Full Version : Icon size and Ribbonbar



Pieter van Dieren
10-May-2017, 09:58 AM
Hi,

I like the better DPI awareness of Dataflex 19.
I even liked it that much that I replaced all my 600+ icons for new icons with 6 sizes....

This all seems to work well, except for our Ribbonbar... :-(
The RibbonBar uses the Sig classes, but those are based on the Dataflex classes.
I set pbAutoResizeIcons to True, but it keeps using the 16x16 (for small items) or 32x32 (for large items) icons.
So far I can't see where it goes wrong, so I'm wondering if anyone of you is using a RibbonBar as well and whether or not you have the same problem....

10901

Edit: Image says fontsize = 200%, but it was 150%

Peter van Mil
10-May-2017, 10:20 AM
Hi Pieter,

It is rather off topic, but where did you get those icons? Did you buy library or are they custom designed? They look very good!

Pieter van Dieren
11-May-2017, 10:09 AM
Hi Peter,

I bought a library: http://www.axialis.com/stock-icons/pure-flat-2013-toolbar.html

Peter van Mil
11-May-2017, 04:38 PM
Thanks. I will look at it.

Pieter van Dieren
21-Mar-2018, 09:50 AM
*BUMP*
We're still having these issues.
Are we really the only one?

Focus
21-Mar-2018, 10:16 AM
Have you tried the all.ico from the Bitmaps folder as one of your icons ?

Pieter van Dieren
22-Mar-2018, 05:37 AM
Hi Focus,

Thanks, but why should that be any different than the icons I use?
I notice that not only the large icons are wrong, but smaller icons in dropdown cCjMenuItems that are being used in the RibbonBar as well.
While all icons outside of the RibbonBar are ok.

Just don't get it (yet).
There must be others out there that use the RibbonBar as well? :-)

Peter Bragg
22-Mar-2018, 05:43 AM
Hi Pieter,

Yes, I use the Ribbon too but sadly cannot help you much because all the icons are sizing ok for me, and I'm pretty sure that it was just a case of setting pbAutoResizeIcons to True ... but you say you've already done that. I had a quick look to see if there was anything else I'd done in the code but there doesn't appear to be. If I spot anything I'll get back to you. And like you, I'm also using the Sig Ribbonbar (or at least, a version of it. And as you say, it is based on the DAW commandbar classes anyway)

Focus
22-Mar-2018, 05:45 AM
I was mainly to prove if it was something in the file format of your icons


The all.ico just contains a 'big number' 16 32 64 etc so you definitely know which one it is selecting

wila
22-Mar-2018, 06:17 AM
Pieter,

Not using the Ribbon myself, but do use quite a bit of codejock and as such have studied their release notes page a bit.
http://www.codejock.com/products/releasenotes/release_notes.asp

What version of codejock are you using?
Might be worthwhile using the latest (18.2 or 18.3) as they do have some fixes after the 17.3.0 version that comes bundled with DF19.

For example in version 18.0 there's this:


Cize computation of Ribbon icons with type xtpButtonIconAndCaptionBelow fixed
Ribbon group icon scaling fixed


Could that be your issue?
--
Wil

Pieter van Dieren
22-Mar-2018, 01:26 PM
Hi Peter,

Thanks for the feedback.
What sizes do your ico files contain?
And what version of CodeJock are you using?

Pieter van Dieren
22-Mar-2018, 01:29 PM
Hi Wil,

Thanks for the info.

We indeed use the version that comes with DF19.
I'm not sure how to use another version though because everything is based on the DF classes that use 17.3.0....

Peter Bragg
23-Mar-2018, 04:07 AM
All our .ico files contain 16x16, 24x24, 32x32, 48x48 and 64x64. We're using DataFlex 19.0 - and therefore the version of the codejock commandbars that that uses (because the ribbonbar is just a subclass of the cCJCommandBarSystem)

Pieter van Dieren
13-Apr-2018, 09:01 AM
FWI, there was no way we could get it right with Codejock v17.3 and the current Sig classes.
So we decided to replace all our Codejock controls with version 18.3.
This obviously required some changes to the ProgId's (and EventId's) in the Dataflex classes and the Sig classes, but it works.
All the problems we had with our Ribbonbar are now gone and it looks great with all font-sizes. So a truly DPI aware program. :)

Peter Bragg
16-Apr-2018, 04:21 AM
So a truly DPI aware program. :)

Good news! But ...sadly I fear it may not be. We too spent a lot of time going through all our icons and making sure that they show the correct sizes in the Ribbon Bar, Treeviews, Buttons, cCjGrids and other codejock components (for example, Task Panel and Docking Panes) - and it certainly does make a real (and great) difference - but images are only a part of the story. We're still battling with text in certain places within our application (see link to other thread)....

https://support.dataaccess.com/Forums/showthread.php?61969-DPI-Scaling-of-Buttons-and-Combo-Forms


Peter

Peter van Mil
16-Apr-2018, 05:11 AM
It is good to know that you have solved it with CodeJock 18.3 (and not with 17.3). Our policy is to use the same CodeJock version as the DataFlex runtime, but in this case we might deviate from your own rules :rolleyes:

Focus
16-Apr-2018, 05:29 AM
How do your form labels and or textboxes look at 125% ?

Are any crashing into forms or bursting out of groups etc

Or do you do everything right justified ? and or plenty of space in your views to keep everything far enough apart ?

Pieter van Dieren
16-Apr-2018, 08:40 AM
It is good to know that you have solved it with CodeJock 18.3 (and not with 17.3). Our policy is to use the same CodeJock version as the DataFlex runtime, but in this case we might deviate from your own rules :rolleyes:

Normally that's our policy as well, but in this case I just needed it to be correct now and didn't want to wait for DataAccess to include CodeJock v18.3.
And it only required changes to 4 files: cCJCommandBars, cCJComSkinFramework, cCJImageManager, cCJReportControl. And the Office DLL files in Dataflex 19.0\bin\styles needed to be replaced by the new ones.

Pieter van Dieren
16-Apr-2018, 09:53 AM
Hi Focus,

We do not have issues with form labels. All our labels are right justified.
However, on 175% or 200%, we see that the Comboforms don't scale properly (which is pretty ugly) and that labels of checkboxes become too short.

So it's not perfect yet>
This is a screenshot of 200% font size (which I use on my Surface Pro):

11810

Focus
17-Apr-2018, 04:35 AM
Looks like you are fortunate to have your labels right justified

At 125% you will notice that the text is disproportionally large when compared to 100%

You will notice this most in small forms like date fields, buttons in a view, combo forms and of course most if you have left justified labels in information rich views

Pieter van Dieren
17-Apr-2018, 05:54 AM
This is a screenshot of 125% versus 100%.
Looks alright to me?

11823

Focus
17-Apr-2018, 06:08 AM
Look at ...

Datum in relation to Eerste

The form labeled Zorgverzekeraar nr: in relation to your section heading verzekering
etc etc


You can see proportionally their size an position is massivly different in relation to EACH OTHER

Focus
17-Apr-2018, 06:23 AM
I do wonder if it is something like the top answer on here
https://stackoverflow.com/questions/2973165/autoscalemode-problems-with-changed-default-font
Where it is suggested that the font needs to be set in every control and not through container inheritance

Pieter van Dieren
17-Apr-2018, 06:36 AM
I see what you mean now.
I have to admit that that doesn't bother me that much though....

What does bother me is the size of the comboforms and the clipping of the checkbox labels (when Auto_Size_State = True) when the fontsize is 200.

Focus
17-Apr-2018, 06:39 AM
It doesn't bother you as you have the luxury of space :)

Peter Bragg
17-Apr-2018, 07:52 AM
Here's an example that highlights exactly that. At the bottom of a view, beneath a grid, I'm showing totals. Space is at a premium but running at 100% everything fits nicely and looks reasonable:

Image 1: Totals_100%

11827


Crank this up to 125% and it looks like a dog's dinner.

Image 2: Totals_125%

11828

Objects start to overlap and labels get clipped. No two ways about it, it just looks bad.


But crank this up to 150% and whilst it's still not perfect, it starts to look better again.

Image 3: Totals_150%

11829


And there are more examples too (no aplogies for again linking to this thread: https://support.dataaccess.com/Forums/showthread.php?61969-DPI-Scaling-of-Buttons-and-Combo-Forms)


Of course, I'm no expert so I'm happy to be wrong, but it just seems that something isn't quite right at 125%. And it's frustrating, because having gone to the trouble of addressing all our icons in an attempt to make our application scale nicely, I still can't advise running it at anything other than 100% or 150%. At 125% it still looks .... meh. But I guess it's something we'll have to live with (and of course, don't get me wrong, it is way better than it always was in the past - it's just that I dream of it being perfect)

Focus
17-Apr-2018, 08:18 AM
The thing I find slightly puzzling is all the people that had issues with 'full' views when the system font changed typeface and also from 8pt to 9pt that raised the issue then aren't also running into this.

Pieter van Dieren
17-Apr-2018, 09:17 AM
It doesn't bother you as you have the luxury of space
I guess that's true. :-)

Pieter van Dieren
17-Apr-2018, 09:33 AM
And it's frustrating, because having gone to the trouble of addressing all our icons in an attempt to make our application scale nicely, I still can't advise running it at anything other than 100% or 150%. At 125% it still looks .... meh. But I guess it's something we'll have to live with (and of course, don't get me wrong, it is way better than it always was in the past - it's just that I dream of it being perfect)

I see what you mean.
I would have to go through our entire program to see if we have some tight spaces somewhere as well.

But I exactly understand the frustration: I too spend a lot of time replacing all my icons (467!) with multi format icons. Having to see that after that effort still the wrong sizes were shown was very frustrating. You just want it to look nice.
So that's why I decided to change the Dataflex classes (to CodeJock v18.3) in order to get it right. Something I normally wouldn't do.

Don't know if this works in your situation, but I nowadays often use the Footer of the cCjGrid to show totals. This will always align perfectly with the columns. And you can put in the footer whatever you want.

Another option is to use a Statusbar:

11831

Focus
17-Apr-2018, 09:35 AM
There is definitely something odd going on.

At 100% the gap between the first form and the Sel label for the second is 10px
If we say that the original design was nominally 600px wide so at 125% it's 750px or in other words there is an extra pixel every 4 original pixels needed for the 125% increase

So the original gap should now be 12px wide but currently it is zero
Even if it was something like the view being at one font/scale and the objects at another 10px is an awful lot of px to 'loose' especially when there should be more !

Focus
17-Apr-2018, 10:01 AM
I bet that Behandelmaanden section on the right gets a bit close at 125%

Pieter van Dieren
17-Apr-2018, 10:33 AM
I bet that Behandelmaanden section on the right gets a bit close at 125%

Actually, it doesn't...

11832

Pieter van Dieren
17-Apr-2018, 10:47 AM
By the way: Something that terribly goes wrong on all fontsizes is two forms I have with a FontPointHeight set to 11:

100%:
11833

125%:
11834

The forms are getting way too big and start to overlap eachother and the icon on the right....

Stephen W. Meeley
17-Apr-2018, 11:05 AM
Pieter,

Our of curiosity, do you see the same kinds of issues if you only use default fonts and settings?

Focus
17-Apr-2018, 11:08 AM
We do :)

Stephen W. Meeley
17-Apr-2018, 11:13 AM
OK. Are the symptoms better, worse or about the same when using defaults?

Focus
17-Apr-2018, 11:17 AM
I would say about the same

You will see examples from the Studio on this thread
https://support.dataaccess.com/Forums/showthread.php?61969-DPI-Scaling-of-Buttons-and-Combo-Forms

Pieter van Dieren
17-Apr-2018, 03:28 PM
Pieter,

Our of curiosity, do you see the same kinds of issues if you only use default fonts and settings?


Hi Stephen,

No. With default fonts there's no overlapping.

With default fonts I've only seen these issues:


On 200% the labels of checkboxes are being clipped.
The height of comboforms is incorrect
Same issues Focus and Peter already mentioned on 125% (although I didn't really notice that in our case because we seem to have enough space between the controls)

Focus
23-Apr-2018, 06:46 AM
Actually after doing some more measuring on the images on the other thread it seems like the problem is more the size of the object that the font

If you look at the combo box width at 100% in both DF and VB it is 157px x 21px (the height is two px more in DF but ignoring that for the moment)

When you go to 125% then VB goes to 208 x 24 and DF goes to 180 x 28

If you just do pure 125% maths it should be around 196.25 x 26.25 (or 28.25)

So you could say VB has gone big on width and a bit shallow on height and DF too small on width and correct on height

I appreciate this is not an exact science but I assume DF can play by the same rules as VB ?

Focus
27-Apr-2018, 07:50 AM
I've downloaded the Visual Studio Community Edition 2017 and tried to recreate the sacred texts Inventory Item view as closely as I could. It's not pixel perfect at 100% and VB text boxes are one pixel shallower than DF forms

I could not find an equivalent of Container3d in VB (but I only looked very briefly)

But you can see when it is scaled to 125% you have two quite different results

I would argue the VB version is 'too wide' overall (more like 132% than 125%) BUT everything seems to fit 'better' relative to each other

DF 100%
11881

VB 100%
11879

DF 125%
11878

VB 125%
11880