Tk Library Source Code

View Ticket
Login
Ticket UUID: a96bdf7e4cc47bf3c62746c36c8f8ff53b87e66b
Title: style: bugs found by the new tests
Type: Bug Version: trunk
Submitter: serhiy.storchaka Created on: 2026-11-21 18:08:48
Subsystem: tklib :: style Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2026-11-21 18:08:48
Resolution: None Closed By: nobody
    Closed on:
Description:

The bugs below were found by the tests in branch tests-style; each is covered by a test with the knownBug constraint (style-2.5, style-5.1, style-6.6). They occur with both Tk 8.6 and 9.1.

  • style::as::init_fonts creates all the numbered fonts ASfontFixedBold-2 ... ASfontFixedBold4 with the base size $fsize instead of $ifsize, so they all have the same size, unlike ASfontN, ASfontBoldN and ASfontFixedN, which grow with the number (style-2.5).
  • style::as::reset without arguments does nothing. It looks for the parts with [info commands style::as::reset_*], a pattern that is resolved relative to the current namespace ::style::as and matches nothing (style::as::init uses [info procs init_*] and works). So after style::as::init and style::as::reset the catch-all <MouseWheel> binding on all is still ::style::as::MouseWheel %W %X %Y %D 0; style::as::reset mousewheel does remove it (style-5.1).
  • On X11, calling style::use lobster (style::lobster::init) a second time fails with named font "LobsterFont" already exists, while style::as::init can be called again: it creates its fonts only if they do not exist yet (style-6.6).