Menu

#2652 rendering problem with ttk::notebook

obsolete: 8.5.7
open
5
2009-07-06
2009-07-06
No

NOTE:
This is bug item #2816331. I replicated this artifact because
comments have been closed for #2816331.

IMPORTANT NOTE:
Please try the following example with X11 windowing system.

IMPORTANT NOTE:
This rendering problem occurs as well without paned windows, e..g. if the
frame containing a notebook is too small.

IMPORTANT NOTE:
Please be patient, it may take a while until you can see the error.
I can see the error if the label is showing a value about 250.

==============================
Bug item #2816331
==============================

Please try the following code:
---------------------------------------------------------------------------
--------------
bind Panedwindow <B1-Motion> {+ .pw.f configure -text %y }
set pw [panedwindow .pw -orient vertical -opaqueresize true -background
darkgray]
set fr [ttk::label $pw.f]
set nb [ttk::notebook $pw.nb]
$pw add $fr -sticky nsew -stretch never
$pw add $nb -sticky nsew -stretch always
$nb add [ttk::frame $nb.f -height 400 -width 400] -sticky nsew -text Test
$nb add [ttk::frame $nb.g -height 400 -width 400] -sticky nsew -text Test
pack $pw -fill both -expand yes
---------------------------------------------------------------------------
--------------

Now watch careful the notebook labels while moving the sash of the paned
window.
Sometimes the labels will be rendered normal, sometimes the relief is too
small.

I have a weak suspicion that the paned window has an error while
calculating the
geometry of the subwindows or while calculating its own geometry. There is
a lack
of two pixels somewhere.

I have tested this on Linux (that means with x11 windowing system).

NOTE: with ttk::panedwindow you will get the same result.

Discussion

  • Joe English

    Joe English - 2009-07-06

    (Re: comments closed on #2816331 -- you need to be logged in, the Tcl and Tk trackers don't allow anonymous comments anymore because of the spammers.)

    Can't replicate with the updated script either. Tried 'default', 'alt', and 'clam' themes, all look OK to me. What theme are you using?

    Also, is this a transient glitch, or permanent? That is, do you still see a glitch when releasing the sash, or does it only show up when a resize is in progress?

     
  • Gregor Cramer

    Gregor Cramer - 2009-07-07

    Thanks for your response, now I'm logged in.

    1) 'puts $::ttk::currentTheme' gives the result 'default'; that means
    I'm using the default theme
    2) the glitch is reproduceable, that means it is permanent
    3) I see the glitch in both cases, when resize is in progress and when
    releasing the sash
    4) I'm using x11 windowing system. This glitch may not occur with other
    rendering systems like win32 or aqua (but I don't know this). Did you
    try my example with x11? Otherwise I don't have an idea why you cannot
    see this obvious glitch.

     
  • Joe English

    Joe English - 2009-07-08

    > Did you try my example with x11?

    Yes. Tested under X.org 6.7, also with XFree86 4.3. Cannot replicate the problem.

    Could you post a screenshot? What platform do you see this on?

     
  • Gregor Cramer

    Gregor Cramer - 2009-07-08

    notebook1: with glitch

     
  • Gregor Cramer

    Gregor Cramer - 2009-07-08

    notebook2: without glitch

     
  • Gregor Cramer

    Gregor Cramer - 2009-07-08

    I added two snapshots. The first one with
    a glitch immediately after popup of the
    window (which is seldom the case, normally
    the glitch occurs after resizing). The second
    one is without any glitch (after resizing a bit).

    My platform:
    Tcl/Tk version: 8.5 (pl6)
    Operating System: Linux 2.6.18
    OS Identifier: linux-glibc2.3-ix86
    X Server Vendor: X.Org 7.1.1