wxDataViewCtrl ellipsize bug on Windows 10

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

wxDataViewCtrl ellipsize bug on Windows 10

trigves
Hi,
I'm using wxWidgets 3.1.1.

In wxDataViewCtrl, if some text column does contain text which is longer that the column width, the ending ellipses should appear (if the given flag is set, of course). On Windows 7 it is working ok, but on Windows 10, the text is trimmed and no ellipses are shown. Only if the column width is much smaller than the text, ellipses are shown.

I'm attaching the screens from the dataview samples, the "attributes" column is the one.

1.png show, how should the text be rendered, if it doesn't fit in the column - ellipses shown.
2.png show the current behavior on Windows 10.
3.png show how it is rendered, if there is enough space in the column.

How to reproduce:
1) Start the sample dataview application
2) Navigate to MyListModel
3) Continuously shrink the "attributes" column, so it doesn't have enough space for full rendering of the text. At one point, the last character(s) are trimmed and no ellipeses are shown. Shrinking it down further, at some point, the ellipses are shown.

Also, when not using "theming" it looks like working ok.

Does anyone know, where could be the problem?

Thank You

Trive



--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users

1.png (37K) Download Attachment
2.png (37K) Download Attachment
3.png (37K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: wxDataViewCtrl ellipsize bug on Windows 10

oneeyeman
Hi,
On Tue, Nov 27, 2018 at 7:30 AM <[hidden email]> wrote:

>
> Hi,
> I'm using wxWidgets 3.1.1.
>
> In wxDataViewCtrl, if some text column does contain text which is longer that the column width, the ending ellipses should appear (if the given flag is set, of course). On Windows 7 it is working ok, but on Windows 10, the text is trimmed and no ellipses are shown. Only if the column width is much smaller than the text, ellipses are shown.
>
> I'm attaching the screens from the dataview samples, the "attributes" column is the one.
>
> 1.png show, how should the text be rendered, if it doesn't fit in the column - ellipses shown.
> 2.png show the current behavior on Windows 10.
> 3.png show how it is rendered, if there is enough space in the column.
>
> How to reproduce:
> 1) Start the sample dataview application
> 2) Navigate to MyListModel
> 3) Continuously shrink the "attributes" column, so it doesn't have enough space for full rendering of the text. At one point, the last character(s) are trimmed and no ellipeses are shown. Shrinking it down further, at some point, the ellipses are shown.
>
> Also, when not using "theming" it looks like working ok.

Which theme do you use?
Are you sure it is wxWidgets problem and not how the theme presents the drawing?

Thank you.

>
> Does anyone know, where could be the problem?
>
> Thank You
>
> Trive
>
>
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wx-users

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wxDataViewCtrl ellipsize bug on Windows 10

trigves

On Tuesday, November 27, 2018 at 7:11:19 PM UTC+1, Igor Korot wrote:
Hi,
On Tue, Nov 27, 2018 at 7:30 AM <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="AF2GtrWRAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">tri...@...> wrote:

>
> Hi,
> I'm using wxWidgets 3.1.1.
>
> In wxDataViewCtrl, if some text column does contain text which is longer that the column width, the ending ellipses should appear (if the given flag is set, of course). On Windows 7 it is working ok, but on Windows 10, the text is trimmed and no ellipses are shown. Only if the column width is much smaller than the text, ellipses are shown.
>
> I'm attaching the screens from the dataview samples, the "attributes" column is the one.
>
> 1.png show, how should the text be rendered, if it doesn't fit in the column - ellipses shown.
> 2.png show the current behavior on Windows 10.
> 3.png show how it is rendered, if there is enough space in the column.
>
> How to reproduce:
> 1) Start the sample dataview application
> 2) Navigate to MyListModel
> 3) Continuously shrink the "attributes" column, so it doesn't have enough space for full rendering of the text. At one point, the last character(s) are trimmed and no ellipeses are shown. Shrinking it down further, at some point, the ellipses are shown.
>
> Also, when not using "theming" it looks like working ok.

Which theme do you use?
Are you sure it is wxWidgets problem and not how the theme presents the drawing?

Thank you.

Sorry, I mean a native theme. When I don't use common control manifest, it is working ok but no native theme then.

I don't know if it is a wxWidgets bug per se. I know that when using wxRendererNative::DrawItemText(), which does use DrawThemeTextEx() does trigger this behavior. I think it has something to do with text size being rendered. If I call GetThemeTextExtent() before the rendering and *USE* the rect computed, the problem is somehow solved.

This is weird, because if I pass the intentionally small rect, the text should be ellipsized in each case, but it isn't.
Also, using wxDataViewRenderer::GetTextExtent() for the text being rendered does trigger the wrong behavior.

I don't have Windows 10 myself, so I cannot debug further.

Thank You

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wxDataViewCtrl ellipsize bug on Windows 10

oneeyeman
Hi,
On Tue, Nov 27, 2018 at 12:35 PM <[hidden email]> wrote:

>
>
> On Tuesday, November 27, 2018 at 7:11:19 PM UTC+1, Igor Korot wrote:
>>
>> Hi,
>> On Tue, Nov 27, 2018 at 7:30 AM <[hidden email]> wrote:
>> >
>> > Hi,
>> > I'm using wxWidgets 3.1.1.
>> >
>> > In wxDataViewCtrl, if some text column does contain text which is longer that the column width, the ending ellipses should appear (if the given flag is set, of course). On Windows 7 it is working ok, but on Windows 10, the text is trimmed and no ellipses are shown. Only if the column width is much smaller than the text, ellipses are shown.
>> >
>> > I'm attaching the screens from the dataview samples, the "attributes" column is the one.
>> >
>> > 1.png show, how should the text be rendered, if it doesn't fit in the column - ellipses shown.
>> > 2.png show the current behavior on Windows 10.
>> > 3.png show how it is rendered, if there is enough space in the column.
>> >
>> > How to reproduce:
>> > 1) Start the sample dataview application
>> > 2) Navigate to MyListModel
>> > 3) Continuously shrink the "attributes" column, so it doesn't have enough space for full rendering of the text. At one point, the last character(s) are trimmed and no ellipeses are shown. Shrinking it down further, at some point, the ellipses are shown.
>> >
>> > Also, when not using "theming" it looks like working ok.
>>
>> Which theme do you use?
>> Are you sure it is wxWidgets problem and not how the theme presents the drawing?
>>
>> Thank you.
>
>
> Sorry, I mean a native theme. When I don't use common control manifest, it is working ok but no native theme then.
>
> I don't know if it is a wxWidgets bug per se. I know that when using wxRendererNative::DrawItemText(), which does use DrawThemeTextEx() does trigger this behavior. I think it has something to do with text size being rendered. If I call GetThemeTextExtent() before the rendering and *USE* the rect computed, the problem is somehow solved.

Does it also works in Windows 7/8?

Thank you.

>
> This is weird, because if I pass the intentionally small rect, the text should be ellipsized in each case, but it isn't.
> Also, using wxDataViewRenderer::GetTextExtent() for the text being rendered does trigger the wrong behavior.
>
> I don't have Windows 10 myself, so I cannot debug further.
>
> Thank You
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wx-users

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wxDataViewCtrl ellipsize bug on Windows 10

trigves
Hi,

On Tuesday, November 27, 2018 at 8:41:36 PM UTC+1, Igor Korot wrote:
Hi,
On Tue, Nov 27, 2018 at 12:35 PM <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="xOaf_qKWAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">tri...@...> wrote:

>
>
> On Tuesday, November 27, 2018 at 7:11:19 PM UTC+1, Igor Korot wrote:
>>
>> Hi,
>> On Tue, Nov 27, 2018 at 7:30 AM <[hidden email]> wrote:
>> >
>> > Hi,
>> > I'm using wxWidgets 3.1.1.
>> >
>> > In wxDataViewCtrl, if some text column does contain text which is longer that the column width, the ending ellipses should appear (if the given flag is set, of course). On Windows 7 it is working ok, but on Windows 10, the text is trimmed and no ellipses are shown. Only if the column width is much smaller than the text, ellipses are shown.
>> >
>> > I'm attaching the screens from the dataview samples, the "attributes" column is the one.
>> >
>> > 1.png show, how should the text be rendered, if it doesn't fit in the column - ellipses shown.
>> > 2.png show the current behavior on Windows 10.
>> > 3.png show how it is rendered, if there is enough space in the column.
>> >
>> > How to reproduce:
>> > 1) Start the sample dataview application
>> > 2) Navigate to MyListModel
>> > 3) Continuously shrink the "attributes" column, so it doesn't have enough space for full rendering of the text. At one point, the last character(s) are trimmed and no ellipeses are shown. Shrinking it down further, at some point, the ellipses are shown.
>> >
>> > Also, when not using "theming" it looks like working ok.
>>
>> Which theme do you use?
>> Are you sure it is wxWidgets problem and not how the theme presents the drawing?
>>
>> Thank you.
>
>
> Sorry, I mean a native theme. When I don't use common control manifest, it is working ok but no native theme then.
>
> I don't know if it is a wxWidgets bug per se. I know that when using wxRendererNative::DrawItemText(), which does use DrawThemeTextEx() does trigger this behavior. I think it has something to do with text size being rendered. If I call GetThemeTextExtent() before the rendering and *USE* the rect computed, the problem is somehow solved.

Does it also works in Windows 7/8?

Thank you.

Yes, it works on Windows 7 and 8.

Trigve

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wxDataViewCtrl ellipsize bug on Windows 10

Vadim Zeitlin-4
In reply to this post by trigves
On Tue, 27 Nov 2018 05:30:54 -0800 (PST)  wrote:

> In wxDataViewCtrl, if some text column does contain text which is longer
> that the column width, the ending ellipses should appear (if the given flag
> is set, of course). On Windows 7 it is working ok, but on Windows 10, the
> text is trimmed and no ellipses are shown. Only if the column width is much
> smaller than the text, ellipses are shown.

 I'm afraid you will need to open a ticket for this as I don't see anything
obviously wrong with our code and I just don't have time to debug this
right now. I will hopefully be able to do it later (but after 3.1.2), as I
use wxDVC in many of my own programs and so am definitely interested in
fixing this and the ticket will serve as a reminder.

 Thanks in advance,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: wxDataViewCtrl ellipsize bug on Windows 10

trigves
Hi,

On Wednesday, November 28, 2018 at 1:51:02 AM UTC+1, Vadim Zeitlin wrote:
On Tue, 27 Nov 2018 05:30:54 -0800 (PST)  wrote:

> In wxDataViewCtrl, if some text column does contain text which is longer
> that the column width, the ending ellipses should appear (if the given flag
> is set, of course). On Windows 7 it is working ok, but on Windows 10, the
> text is trimmed and no ellipses are shown. Only if the column width is much
> smaller than the text, ellipses are shown.

 I'm afraid you will need to open a ticket for this as I don't see anything
obviously wrong with our code and I just don't have time to debug this
right now. I will hopefully be able to do it later (but after 3.1.2), as I
use wxDVC in many of my own programs and so am definitely interested in
fixing this and the ticket will serve as a reminder.

 Thanks in advance,
VZ
 

Done, https://trac.wxwidgets.org/ticket/18280.

Trigve

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users