Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Mon, 2012-06-04 at 11:45 +0400, Ivan Timofeev wrote:
moving controls in every page is a huge tedious work...

All of our hard-coded positions widgetry is hugely miserable. FWIW I've
some experimental stuff in
http://cgit.freedesktop.org/libreoffice/core/log/?h=feature/cmclayout
where we have layout widgets and can also render gtkbuilder xml (i.e.
use glade as visual widget editor). In that world it should (eventually
anyway) be possible to just hide the unwanted widgets and the layout
will do the right thing automatically.

What I've got so far...

There's 
a) a "ui-previewer" mini-app in there that can render arbitrary
gtkbuilder xml with vcl widgets (well, the stuff I've implemented so
far) and an example .ui xml in vcl/qa/cppunit/builder/demo.ui
b) a hard-coded character dialog with layout example
c) a hard-coded word-count dialog with layout example
d) a title page dialog which demos loading gtk builder xml from a .ui
file
e) a view zoom example where an existing dialog is made layout aware and
loads .ui xml with no code changes
f) an insert break example where an existing dialog is made layout aware
and loads .ui xml with no code changes

The hope is that we end up in a place where someone can just edit and/or
create dialogs in glade and drop them into the right place and it "just
works" without it being necessary to change any additional code at all.

Once a dialog is converted over than a hacker at their leisure can go
back to the dialog code and trivially tidy it up to e.g. delete all the
code in it which just exists to create the widgets, mark it as not
loading resources from a .src file anymore, and remove those too, etc.

The big stuff that remains to be done is a
a) translations, whether to for the interim use our existing "translate
xml" mechanism or move over to gettext. Probably just use our existing
stuff for now and leave gettext as a battle for a later time
b) generate stub .ui files from .src files to load in glade to get an
initial ugly dialog with the correct id names to prettify

Medium stuff is
a) rtl mode
b) more widgets
c) theme tweaks
d) odd placement of reset button in page dialog
e) connect up GtkListStore in .ui files to pre-full dropdown lists, e.g.
to complete the insert break example
f) see how close I can get to converting an entire tab dialog with
custom widgets etc. over to a .ui file
g) follow system ok, help, cancel button order, etc.

Here's some screenshots of two examples
before:
http://people.redhat.com/caolanm/png/oldzoom.png
http://people.redhat.com/caolanm/png/oldwordcount.png

after:
http://people.redhat.com/caolanm/png/newzoom.png
http://people.redhat.com/caolanm/png/newwordcount.png

C.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.