[GSOC]Use Widget Layout for the Start Center Weekly Update 02
Krisztian Pinter
pin.terminator at gmail.com
Wed Jul 3 11:18:39 PDT 2013
Hi,
Thank you for sharing this, I tried removing the toplevel, and checking the
visibility option, but it didn't help, unfortunately.
I decided to take a different approach. I started again with the original
source files which use resource files, and changed only one button to be
dynamically allocated, so I call
mpWriterButton = new PushButton( this, STC_BUTTON_STYLE );
in the ctor of BackingWindow. The reason I tried this is because .ui
buttons use pointers to buttons as well.
This causes a crash in Window::PreNotify(NotifyEvent&) when mpWriterButton
is clicked, the other buttons work fine.
When I change the button to be a .ui button, and instead of the above I
call this:
m_pUIBuilder = new VclBuilder(this, getUIRootDir(),
"modules/StartModule/ui/startcenter.ui", "StartCenter");
get( mpWriterButton, "writer");
it's not drawn, but it actually works; I can select it using the arrow
keys, and when I press enter Writer starts. Since I left the manual
formatting code for the buttons intact for now, I'd expect that to properly
size and position this button, but it doesn't.
On 3 July 2013 01:48, Efe Gürkan YALAMAN <efeyalaman at gmail.com> wrote:
> Hi,
>
> I solved my problem. I hope it helps you too.
>
> The layout thing I mentioned before is related to ui file. If ui file
> contains a toplevel it returns false. I cleaned toplevels and it returns
> true now. It is probably not related to your problem.
>
> So I figured out on other ui files almost everything has visible option
> setted "True". I changed mine that way and checked with ui-previewer.
> Problem is gone now.
>
> Hope it helps.
>
> Cheers.
>
>
> --
> Efe Gürkan YALAMAN
> http://about.me/efegurkan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130703/4317b0d8/attachment.html>
More information about the LibreOffice
mailing list