Prev: Announce: BWidget 1.9.2
Next: ANNOUNCE: lriobf 1.0
From: MSEdit on 8 Jun 2010 11:34 # black.tcl - # # Experimental! # # Copyright (c) 2007-2008 Mats Bengtsson # # $Id: black.tcl,v 1.13 2008-06-07 06:50:38 matben Exp $ package require Tk 8.5; # minimum version for Tile namespace eval ttk { namespace eval theme { namespace eval black { variable version 0.0.1 } } } namespace eval ttk::theme::black { #variable imgdir [file join [file dirname [info script]] black] #variable I #array set I [tile::LoadImages $imgdir *.png] variable dir [file dirname [info script]] # NB: These colors must be in sync with the ones in black.rdb variable colors array set colors { -disabledfg "#999999" -frame "#424242" -dark "#222222" -darker "#121212" -darkest "black" -lighter "#626262" -lightest "#ffffff" -selectbg "#4a6984" -selectfg "#ffffff" } ttk::style theme create black -parent clam -settings { # ----------------------------------------------------------------- # Theme defaults # ttk::style configure "." \ -background $colors(-frame) \ -foreground white \ -bordercolor $colors(-darkest) \ -darkcolor $colors(-dark) \ -lightcolor $colors(-lighter) \ -troughcolor $colors(-darker) \ -selectbackground $colors(-selectbg) \ -selectforeground $colors(-selectfg) \ -selectborderwidth 0 \ -font TkDefaultFont \ ; ttk::style map "." \ -background [list disabled $colors(-frame) \ active $colors(-lighter)] \ -foreground [list disabled $colors(-disabledfg)] \ -selectbackground [list !focus $colors(-darkest)] \ -selectforeground [list !focus white] \ ; # ttk widgets. ttk::style configure TButton \ -width -8 -padding {5 1} -relief raised ttk::style configure TMenubutton \ -width -11 -padding {5 1} -relief raised ttk::style configure TCheckbutton \ -indicatorbackground "#ffffff" -indicatormargin {1 1 4 1} ttk::style configure TRadiobutton \ -indicatorbackground "#ffffff" -indicatormargin {1 1 4 1} ttk::style configure TEntry \ -fieldbackground white -foreground black \ -padding {2 0} ttk::style configure TCombobox \ -fieldbackground white -foreground black \ -padding {2 0} ttk::style configure TNotebook.Tab \ -padding {6 2 6 2} # tk widgets. ttk::style map Menu \ -background [list active $colors(-lighter)] \ -foreground [list disabled $colors(-disabledfg)] ttk::style configure TreeCtrl \ -background gray30 -itembackground {gray60 gray50} \ -itemfill white -itemaccentfill yellow } } # A few tricks for Tablelist. namespace eval tablelist {} proc tablelist::blackTheme {} { variable themeDefaults array set colors [array get ttk::theme::black::colors] array set themeDefaults [list \ -background white \ -foreground black \ -disabledforeground "#999999" \ -stripebackground "" \ -selectbackground $colors(-selectbg) \ -selectforeground $colors(-selectfg) \ -selectborderwidth 0 \ -font TkTextFont \ -labelbackground $colors(-frame) \ -labeldisabledBg "#dcdad5" \ -labelactiveBg "#eeebe7" \ -labelpressedBg "#eeebe7" \ -labelforeground white \ -labeldisabledFg "#999999" \ -labelactiveFg white \ -labelpressedFg white \ -labelfont TkDefaultFont \ -labelborderwidth 2 \ -labelpady 1 \ -arrowcolor "" \ -arrowstyle sunken10x9 \ ] } package provide ttk::theme::black $::ttk::theme::black::version The important line is the ttk::style theme create black -parent clam -settings which inherits and overrides the clam settings. There was talk (at the European TCL User Meeting) of a central collection (Wiki maybe) of user defined themes. Martyn
From: Georgios Petasis on 8 Jun 2010 11:41 στις 8/6/2010 17:37, O/H Christian Rapp έγραψε: > > @George > > I'am sorry bute I don't think tilegtk/tileqt is really usable. Still > too many bugs and optical glitches. It is good work but not finished > and we would need native look& feel on Gtk / Qt. > > Regards I see that this rumor circulates c.l.t, but I am not sure it is true. As a user, you may see some visual glitches in tileqt for example, and it is easy to attribute them as tileQt bugs. In reality these may be due to limitations of the Qt engine, or even bugs in the Qt style themselves. And these cannot be fixed. Just use a theme that is correct :-) The GTK themes are more primitive, and thus easier to support. But the configuration system of gtk is a mess. Even if there are some visual glitches there (of course I have not tested all themes), it is still your best bet right now. For me, bugs are when tileqt/tilegtk crash and terminate your application. Visual differences with native apps are not bugs, but adjustments that are theme specific, that can be fixed from the Tcl level. Lot's of theme declare wrong element dimensions, which are fixed by qt or gtk due to other reasons. In ttk themes these fixes cannot be applied automatically. And finally, there is always the option to try and use them, and report bugs. But please don't report bugs on forked projects: in such a case report the bugs into the authors of the forked projects directly :-) George
From: Christian Rapp on 8 Jun 2010 14:38 On 8 Jun., 17:41, Georgios Petasis <peta...(a)iit.demokritos.gr> wrote: > ÏÏÎ¹Ï 8/6/2010 17:37, O/H Christian Rapp ÎγÏαÏε: > > > > > @George > > > I'am sorry bute I don't think tilegtk/tileqt is really usable. Still > > too many bugs and optical glitches. It is good work but not finished > > and we would need native look&  feel on Gtk / Qt. > > > Regards > > I see that this rumor circulates c.l.t, but I am not sure it is true. > As a user, you may see some visual glitches in tileqt for example, and > it is easy to attribute them as tileQt bugs. In reality these may be due > to limitations of the Qt engine, or even bugs in the Qt style > themselves. And these cannot be fixed. Just use a theme that is correct :-) > > The GTK themes are more primitive, and thus easier to support. But the > configuration system of gtk is a mess. Even if there are some visual > glitches there (of course I have not tested all themes), it is still > your best bet right now. > > For me, bugs are when tileqt/tilegtk crash and terminate your > application. Visual differences with native apps are not bugs, but > adjustments that are theme specific, that can be fixed from the Tcl > level. Lot's of theme declare wrong element dimensions, which are fixed > by qt or gtk due to other reasons. In ttk themes these fixes cannot be > applied automatically. > > And finally, there is always the option to try and use them, and report > bugs. But please don't report bugs on forked projects: in such a case > report the bugs into the authors of the forked projects directly :-) > > George Hi George, ok you might be right optical glitches do not have to be a bug. Unfortunately Jos Decoster stopped working on tileqt despite he was already there. Ok it does not help to complain, like I said you did a splendid job. I will retry tilegtk this evening to see what it looks like. Regards
From: Christian Rapp on 8 Jun 2010 15:56 On 8 Jun., 17:34, MSEdit <mse...(a)gmail.com> wrote: > # black.tcl - > # > # Experimental! > # > # Copyright (c) 2007-2008 Mats Bengtsson > # > # $Id: black.tcl,v 1.13 2008-06-07 06:50:38 matben Exp $ > > package require Tk 8.5; # minimum version for Tile > > namespace eval ttk { > namespace eval theme { > namespace eval black { > variable version 0.0.1 > } > } > > } > > namespace eval ttk::theme::black { > > #variable imgdir [file join [file dirname [info script]] black] > #variable I > #array set I [tile::LoadImages $imgdir *.png] > > variable dir [file dirname [info script]] > > # NB: These colors must be in sync with the ones in black.rdb > variable colors > array set colors { > -disabledfg "#999999" > -frame "#424242" > -dark "#222222" > -darker "#121212" > -darkest "black" > -lighter "#626262" > -lightest "#ffffff" > -selectbg "#4a6984" > -selectfg "#ffffff" > } > > ttk::style theme create black -parent clam -settings { > > # > ----------------------------------------------------------------- > # Theme defaults > # > ttk::style configure "." \ > -background $colors(-frame) \ > -foreground white \ > -bordercolor $colors(-darkest) \ > -darkcolor $colors(-dark) \ > -lightcolor $colors(-lighter) \ > -troughcolor $colors(-darker) \ > -selectbackground $colors(-selectbg) \ > -selectforeground $colors(-selectfg) \ > -selectborderwidth 0 \ > -font TkDefaultFont \ > ; > > ttk::style map "." \ > -background [list disabled $colors(-frame) \ > active $colors(-lighter)] \ > -foreground [list disabled $colors(-disabledfg)] \ > -selectbackground [list !focus $colors(-darkest)] \ > -selectforeground [list !focus white] \ > ; > > # ttk widgets. > ttk::style configure TButton \ > -width -8 -padding {5 1} -relief raised > ttk::style configure TMenubutton \ > -width -11 -padding {5 1} -relief raised > ttk::style configure TCheckbutton \ > -indicatorbackground "#ffffff" -indicatormargin {1 1 4 1} > ttk::style configure TRadiobutton \ > -indicatorbackground "#ffffff" -indicatormargin {1 1 4 1} > > ttk::style configure TEntry \ > -fieldbackground white -foreground black \ > -padding {2 0} > ttk::style configure TCombobox \ > -fieldbackground white -foreground black \ > -padding {2 0} > > ttk::style configure TNotebook.Tab \ > -padding {6 2 6 2} > > # tk widgets. > ttk::style map Menu \ > -background [list active $colors(-lighter)] \ > -foreground [list disabled $colors(-disabledfg)] > > ttk::style configure TreeCtrl \ > -background gray30 -itembackground {gray60 gray50} \ > -itemfill white -itemaccentfill yellow > } > > } > > # A few tricks for Tablelist. > > namespace eval tablelist {} > > proc tablelist::blackTheme {} { > variable themeDefaults > array set colors [array get ttk::theme::black::colors] > array set themeDefaults [list \ > -background white \ > -foreground black \ > -disabledforeground "#999999" \ > -stripebackground "" \ > -selectbackground $colors(-selectbg) \ > -selectforeground $colors(-selectfg) \ > -selectborderwidth 0 \ > -font TkTextFont \ > -labelbackground $colors(-frame) \ > -labeldisabledBg "#dcdad5" \ > -labelactiveBg "#eeebe7" \ > -labelpressedBg "#eeebe7" \ > -labelforeground white \ > -labeldisabledFg "#999999" \ > -labelactiveFg white \ > -labelpressedFg white \ > -labelfont TkDefaultFont \ > -labelborderwidth 2 \ > -labelpady 1 \ > -arrowcolor "" \ > -arrowstyle sunken10x9 \ > ] > > } > > package provide ttk::theme::black $::ttk::theme::black::version > > The important line is the > ttk::style theme create black -parent clam -settings > which inherits and overrides the clam settings. > > There was talk (at the European TCL User Meeting) of a central > collection (Wiki maybe) of user defined themes. > > Martyn This looks quite nice and a central collection of tile themes would be great. I have one Problem with your code, the border of labelframes is invisible and the selected item in a treeview widget has no special color. In the clam theme this is some dark blue. But I got the general idea and may be able to rework your code so it is working as I want. Thank you! Regards
From: Igor Novikov on 7 Jul 2010 05:34
On 8 иÑн, 18:41, Georgios Petasis <peta...(a)iit.demokritos.gr> wrote: > ÏÏÎ¹Ï 8/6/2010 17:37, O/H Christian Rapp ÎγÏαÏε: > > > > > @George > > > I'am sorry bute I don't think tilegtk/tileqt is really usable. Still > > too many bugs and optical glitches. It is good work but not finished > > and we would need native look&  feel on Gtk / Qt. > > > Regards > > I see that this rumor circulates c.l.t, but I am not sure it is true. > As a user, you may see some visual glitches in tileqt for example, and > it is easy to attribute them as tileQt bugs. In reality these may be due > to limitations of the Qt engine, or even bugs in the Qt style > themselves. And these cannot be fixed. Just use a theme that is correct :-) > > The GTK themes are more primitive, and thus easier to support. But the > configuration system of gtk is a mess. Even if there are some visual > glitches there (of course I have not tested all themes), it is still > your best bet right now. > > For me, bugs are when tileqt/tilegtk crash and terminate your > application. Visual differences with native apps are not bugs, but > adjustments that are theme specific, that can be fixed from the Tcl > level. Lot's of theme declare wrong element dimensions, which are fixed > by qt or gtk due to other reasons. In ttk themes these fixes cannot be > applied automatically. > > And finally, there is always the option to try and use them, and report > bugs. But please don't report bugs on forked projects: in such a case > report the bugs into the authors of the forked projects directly :-) > > George Sorry George, can you explain why you used Qt classes inside tilegtk? Regards, Igor Novikov sK1 Project http://sk1project.org |