pyjsorg opened this Issue Apr 27, 2012 · 3 comments


None yet
1 participant

pyjsorg commented Apr 27, 2012

series of patches by serge (good stuff).

Original issue: (June 23, 2010 15:20:32)


pyjsorg commented Apr 27, 2012

From on June 23, 2010 15:31:04:
(this is duplicated at - please use that to discuss this issue)

On Jun 23, 3:43 pm, Serge Tarkovski wrote:

Hi all!

allo :)

I've implemented some patches - could anyone take a look?

yyyup. best working practice / preference: add to as an attachment, then we go from there.

CaptionPanel - added default style

yes. good. why wasn't that there already?

DialogBox - added possibility to be auto-centerable on show and on
window resize, added optional 'close' button

like the principle. not so keen on the gif file.

MenuBar - additional styles for vertical and horizontal menu to
distinguish them visually (as GWT does)


  • def getDefaultStyleName(self):

  •    return "gwt-MenuBar " + "gwt-MenuBar-vertical" if self.vertical else "gwt-MenuBar-horizontal"

    this is over 80 chars. not ok.

  •        self.popup.setPopupPosition(self.getAbsoluteLeft() + 
  •        self.popup.setPopupPosition(self.getAbsoluteLeft() +

i preferrr these as separate patches (labelled "whitespace cleanup"). git-am will help you to do multi-patches.

TabPanel - added possibility to create closable tabs

i can't see clearly what's been done here, because you moved the function. please don't do that and make code changes.


ah. you've now created enableGlass and disableGlass, which puts this firmly into the "setXxxxx" category. please can you therefore:

  • rename glass= to Glass= in the constructor

  • create a setGlass function which takes on param (True/False)

  • remove the hard-coded setup of = DOM.createDiv() etc.

  • store the GlassStyleName parameter as a member in the class

  • use that parameter in setGlass, calling self.setGlassStyleName(self.glassStyleName)

    if this is too complex / not obvious, i'll do it.

The code is here - leave
comments there)

nooo, please disregard this request.

comments should be left in the issue tracker, where they belong, so that people can track them in the correct place.

Examples will come later.

excellent. as attachments / patches, added to the issue tracker, please.

Also, I've been playing with pyjsglade tool and, being unsatisfied
with its default styling, I have stolen CSS from GWT examples page,
and applied it with some minor modifications. Some screenshots could
be seen here -

If anyone wants, I could provide current CSS I use - I am not
publishing it only due it has a lot of stuff not applicable to Pyjamas
at the moment and requires a refactoring.

i'm sure kees would be interested.

Would you guys consider adding some default styling bundled with
Pyjamas distrubution?

yes. it's been on the TODO list for a while (issue tracker). it would be really nice to have some sort of auto-generator of stylesheet fragments which can automatically be added even under pyjamas-desktop.

that might have to involve some code which creates a <style> node and adds it to the DOM but adds it early enough so that manual CSS stylesheets can override the entries.

hmm, i wonder if that will even fly? :)



pyjsorg commented Apr 27, 2012

From on June 23, 2010 17:14:22:
ok, ok, they're all .gifs in the pyjs/public directory grumble, so a few more can't hurt. could you attach them here as actual file attachments because they're binary files and "git apply" won't accept the appspot-generated patch.


pyjsorg commented Apr 27, 2012

From on June 23, 2010 17:44:34:
ok some of these are in. makeCloseable i renamed to setCloseable and it is now called through UIApplier, by setting "Closeable=True" not "closeable=True".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment