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


Hi Krisztian,

Sorry for my late reply :-(

Krisztian Pinter píše v St 21. 08. 2013 v 21:08 +0200:

I'm also working on adding a toggle button to switch between recent
docs and templates, but I encountered a problem.
Here's a patch with a non-functioning test
version: https://gerrit.libreoffice.org/#/c/5543/
I have two custom widgets in a grid, one for templates and one for
recent docs, but they both render as a narrow white strip. (See the
tab for presentations.) On the last tab, you can see that the custom
widget for templates is working properly.

This turns out to conflict with the recent addition of more of the
buttons - can you please rebase it on top of the current master?  Will
have a look tomorrow :-)

I was asked if I could make the scrolling smoother (it always moves
thumbnails 1 row at once when the scrollbar passes a treshold) in the
RecentDocsView class I made. RecentDocsView inherits from
ThumbnailView, which uses Window::HandleScrollCommand for scrolling.
Is it possible to make it smoother without basically reimplementing
Window::HandleScrollCommand?

So I believe this is more about how the scrollbar in ThumbnailView is
setup, than the exact handling of HandleScrollCommand.  If I read it
correctly, mpScrBar in sfx2/source/control/thumbnailview.cxx uses things
like

mpScrBar->SetRangeMax( (nCurCount+mnCols-1)/mnCols);

and 

mpScrBar->SetThumbPos( (long)mnFirstLine );

ie. is explicitly set so that 1 line is one thumbnail only.

I'd try to make it multiplied by 10 or so, and adjust the drawing offset
& obtaining the current position accordingly - does that make sense?

In the original Start Center, one could drag and drop files onto it,
and they would open. I noticed that this only worked if one didn't
drop the file on a button, but on the background. After converting
to .ui, it only works if one drops the file on the edge of the window,
where there aren't any widgets covering the background. Is there a way
to cover the whole window with the drag&drop functionality?

Hard to say - I'd try to add the drag and drop handler for one of the
buttons to check if you can make it work that way on one of the buttons;
and if that works, go for a broader solution.  And if no broader
solution exists, then either decide that we are not going to support
that any longer, or set all the widgets with the drop functionality ;-)

I was asked to make the background of RecentDocsView transparent,
instead of white. I checked, and ThumbnailView::Paint draws a rounded
rectangle with it's set background color. I set this color to
COL_TRANSPARENT, and now indeed it seems not to draw this rectangle,
but the background of the custom widget is still a white rectangle. Is
this behavior inherited from Window or Control or something? And is it
possible to change it? The inherited Paint methods don't seem to be
drawing anything.

I haven't looked deeper, but there is that SetBackground() function; you
might want to use something like

SetBackground(Wallpaper( COL_TRANSPARENT ))

But did not try it myself; if that does not lead anywhere, please poke
me, I'll play with that.

All the best,
Kendy



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.