From: Kevin W. <kw...@co...> - 2014-12-21 16:51:08
|
Hi all, As I noted yesterday, I have run into a wall on trying to address bugs with the scrollbar in Tk-Cocoa, as reported here by Linus Nyberg: https://sourceforge.net/p/tcl/mailman/message/33162978/ (Linus, by the way, can you please file a bug report at the tracker at http://core.tcl.tk/tk/reportlist? Thanks.) I've also run into a similar wall on trying to address the menubutton widgets as reported by Russell Owen here: http://core.tcl.tk/tk/tktview/7a325ad72cbb6e331fbae3f4116fe112bda698f4 I am now asking for help from the community in addressing these bugs. I must be candid: most of the progress that we've made on improving Cocoa/Tk over the past few years, particularly in fixing the most serious bugs, is the result of patches submitted by developers attacking pain points specific to their work. I'm thinking of the language input patches submitted by Adrian Robert, the image processing and button patches submitted by Marc Culler, and others. As the de-facto maintainer of Tk/Cocoa, I'm efficient at reviewing and applying patches, and occasionally I will go through and fix a bug on my own, or can diagnose a fix based on some specific reports. But in the majority of cases, I am not able to find solutions to the bug being reported. This is frustrating for me, and for you as well. But when developers who are smarter and better than me look at something specific, the result is often a very helpful patch that really fixes a big problem. So, I'm asking: anyone who can investigate any of these bugs, please do so. I promise to review patches in a very timely fashion. Here is a list of my open bugs at the tracker: http://core.tcl.tk/tk/rptview?rn=16 I am grateful for any help anyone can provide. I do not believe I can make further significant progress on Tk/Cocoa by myself. I'm sorry about that, but my skillset is what it is. I try to compensate for any of my own limitations by being responsive and efficient in reviewing contributions from others, because it makes no difference to me where the improvements come from: I just want the toolkit to get better. I know you agree. But this isn't going to happen if I am working by myself. I need more contributions from the community. Thank you, Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |
From: Kevin W. <kw...@co...> - 2014-12-23 02:39:01
|
On 12/21/14 11:51 AM, Kevin Walzer wrote: > As I noted yesterday, I have run into a wall on trying to address bugs > with the scrollbar in Tk-Cocoa, as reported here by Linus Nyberg: > > https://sourceforge.net/p/tcl/mailman/message/33162978/ > > (Linus, by the way, can you please file a bug report at the tracker at > http://core.tcl.tk/tk/reportlist? Thanks.) > > I've also run into a similar wall on trying to address the menubutton > widgets as reported by Russell Owen here: > > http://core.tcl.tk/tk/tktview/7a325ad72cbb6e331fbae3f4116fe112bda698f4 > > I am now asking for help from the community in addressing these bugs. After taking a bit time to consider an approach to these bugs, I have decided to revisit the issues by adding to the ttk package (it currently lacks a scrollbar for OS X), and also by borrowing from the ttk approach for buttons, etc. This will reduce the amount of work relative to re-implementing the button and scrollbar code from scratch. When I have more to report and /or test, I will post here. Wish me luck! --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |
From: Joe E. <jen...@fl...> - 2014-12-23 18:20:49
|
Kevin Walzer wrote: > > After taking a bit time to consider an approach to these bugs, I have > decided to revisit the issues by adding to the ttk package (it currently > lacks a scrollbar for OS X), and also by borrowing from the ttk approach > for buttons, etc. This will reduce the amount of work relative to > re-implementing the button and scrollbar code from scratch. When I have > more to report and /or test, I will post here. Just a heads-up re: ttk::scrollbars on OSX: There is an impedance mismatch between the way Tile wants to implement scrollbars and the HITheme API. The ttk::scrollbar Tcl bindings expect scrollbars to be composed of multiple elements, and use [$sb identify element] to determine what to do on ButtonPress events &c. HIThemeDrawTrack(), however, wants to draw the entire scrollbar as a single unit. Apple provided hit-test routines to determine what part of the scrollbar is under a given point [*], but the Tile framework never evolved a mechanism by which that information could be queried and returned to scripts. There were ways to work around this mismatch for sliders and progress bars, but I never managed to get scrollbars working; that's why ttk::scrollbar dispatches to tk::scrollbar on OSX. --Joe English jen...@fl... [*] If I recall correctly. It appears that all online documentation related to the OSX Appearance Manger interface has gone into the Memory Hole. |
From: Kevin W. <kw...@co...> - 2014-12-23 19:18:07
|
Hi Joe, On 12/23/14 1:20 PM, Joe English wrote: > There were ways to work around this mismatch for sliders > and progress bars, but I never managed to get scrollbars > working; that's why ttk::scrollbar dispatches to tk::scrollbar > on OSX. Thanks for the reminder here. I remember this being an issue back in the day, and the compromise (just map to the Tk scrollbar) was effective because visually it was already native. After doing a bit more digging into HITheme, it's likely that I will borrow a lot of the ttk C-level code in reivsing the implementation of the Mac buttons, menubuttons and scrollbars. Visually HITheme is almost identical to the Cocoa widgets. However, I will be adapting this stuff to Tk's API, not ttk's. This means that the revised Tk widgets will still be as configurable as before, and will not respond to ttk:: commands. Thanks, Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |
From: Kevin W. <kw...@co...> - 2014-12-24 05:09:14
|
On 12/22/14 9:38 PM, Kevin Walzer wrote: >> As I noted yesterday, I have run into a wall on trying to address bugs >> >with the scrollbar in Tk-Cocoa, as reported here by Linus Nyberg: >> > >> >https://sourceforge.net/p/tcl/mailman/message/33162978/ >> > >> >(Linus, by the way, can you please file a bug report at the tracker at >> >http://core.tcl.tk/tk/reportlist? Thanks.) >> > >> >I've also run into a similar wall on trying to address the menubutton >> >widgets as reported by Russell Owen here: >> > >> >http://core.tcl.tk/tk/tktview/7a325ad72cbb6e331fbae3f4116fe112bda698f4 >> > >> >I am now asking for help from the community in addressing these bugs. > After taking a bit time to consider an approach to these bugs, I have > decided to revisit the issues by adding to the ttk package (it currently > lacks a scrollbar for OS X), and also by borrowing from the ttk approach > for buttons, etc. This will reduce the amount of work relative to > re-implementing the button and scrollbar code from scratch. When I have > more to report and /or test, I will post here. And now, after a day of hacking, I've done a couple of commits to trunk and core-8-5-branch that implement the following Tk/Cocoa improvements: 1. The scrolling flicker issue appears to be gone. I've addressed this by implementing custom drawing of the scrollbar that mimics the standard Cocoa UI as closely as possible. I do not fully understand why this seems to fix the issue that Linus reports, as well as multiple other issues that I've observed with "ghosted" scrollbars, but all my tests show no issues. The new drawing is supported on 10.7 and above, when the new scrollbar style was introduced. I have not tested this on 10.6 and below, and do not plan to. Linus, please test the update and I'll close the bug if you confirm it works. 2. I've made substantial improvement in how the menubutton is rendered during window resizing, which was the basis of Russell's bug report. When the menubutton is in a mapped state the flicker is completely gone. When unmapped, alas, it still shows up as a "ghost" image, but the flicker is somewhat reduced. I do not know how to resolve this, but I will take the substantial improvement here as a win. Russell, please test the update and I'll close the bug if you confirm it works. 3. As a happy side effect of the menubutton fix, window performance in general seems improved during resizing. I added a couple of method calls that defer some redrawing while the window is being resized, and that seems to smooth things out a good deal. I think these fixes are sufficient for now. As you know, I had spent some time looking at the possibility of borrowing some of ttk's code in rendering buttons, menubuttons, and the like using the HITheme API, but integrating that with Cocoa is simply impractical or far more work than I wanted to take on. In any case, I think things are now on more solid ground after the removal of the private API's, and I'll continue to investigate incremental improvements as time and bug reports allow. And my earlier invitation to submit patches stands: some of the big improvements over the past year are things I could never have come up with on my own! Enjoy these improvements as an early Christmas present. Happy holidays, Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |
From: Steve L. <st...@di...> - 2014-12-24 05:31:59
|
> On 24 Dec 2014, at 1:09 pm, Kevin Walzer <kw...@co...> wrote: > > And now, after a day of hacking, I've done a couple of commits to trunk > and core-8-5-branch that implement the following Tk/Cocoa improvements: ... > Enjoy these improvements as an early Christmas present. Many thanks Kevin. Your investment of time and energy is greatly appreciated. Steve |
From: Will D. <wi...@wj...> - 2014-12-24 07:07:42
|
On Dec 23, 2014, at 9:31 PM, Steve Landers <st...@Di...> wrote: > >> On 24 Dec 2014, at 1:09 pm, Kevin Walzer <kw...@co...> wrote: >> >> And now, after a day of hacking, I've done a couple of commits to trunk >> and core-8-5-branch that implement the following Tk/Cocoa improvements: > ... >> Enjoy these improvements as an early Christmas present. > > Many thanks Kevin. Your investment of time and energy is greatly appreciated. +1 > > Steve > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Tcl-mac mailing list > tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac |
From: Andreas K. <and...@ac...> - 2015-01-05 19:00:39
|
Fully agreed. On Tue, Dec 23, 2014 at 11:07 PM, Will Duquette <wi...@wj...> wrote: > > On Dec 23, 2014, at 9:31 PM, Steve Landers <st...@Di...> wrote: > >> >>> On 24 Dec 2014, at 1:09 pm, Kevin Walzer <kw...@co...> wrote: >>> >>> And now, after a day of hacking, I've done a couple of commits to trunk >>> and core-8-5-branch that implement the following Tk/Cocoa improvements: >> ... >>> Enjoy these improvements as an early Christmas present. >> >> Many thanks Kevin. Your investment of time and energy is greatly appreciated. > > +1 > >> >> Steve >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming! The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net >> _______________________________________________ >> Tcl-mac mailing list >> tc...@li... >> https://lists.sourceforge.net/lists/listinfo/tcl-mac > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Tcl-Core mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-core -- Andreas Kupries Senior Tcl Developer Code to Cloud: Smarter, Safer, Faster™ F: 778.786.1133 and...@ac..., http://www.activestate.com Learn about Stackato for Private PaaS: http://www.activestate.com/stackato |