Peter Kümmel wrote:
> Peter Kümmel wrote:
>> Abdelrazak Younes wrote:
>>> Peter Kümmel wrote:
>>>> Peter Kümmel wrote:
>>>>> Abdelrazak Younes wrote:
>>>>>> Peter,
>>>>>>
>>>>>> I think you did that change. Please revert it or fix it the proper way.
>>>>> I'll revert, didn't know the proper way.
>>> The proper way would be to hide it when there is no need to show it. We
>>> can not rely on Qt automatic mode for this because we maintain our own
>>> WorkArea.
>>>
>>>> But the scrolling bar is sooo ugly....
>>> I agree but that the small time lapse when the WorkArea is resized when
>>> you switch buffers is even uglier.
>>>
>>> I you want, you can disable it when there is no Buffer (in grayOut())...
>>>
>> or switching to always on when the scrollbar becomes visible the first time.
>>
> 
> Is this a better solution? Means could I check it in?
>

I've checked it in, because it's totally uncritical:


Index: /lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.C
===================================================================
--- /lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.C (revision 15906)
+++ /lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.C (revision 15935)
@@ -164,9 +164,9 @@
 {
        cursor_ = new frontend::CursorWidget();
        cursor_->hide();

-       setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+       setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
        setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
        setAcceptDrops(true);
        setMinimumSize(100, 70);

@@ -217,8 +217,11 @@


 void GuiWorkArea::setScrollbarParams(int h, int scroll_pos, int 
scroll_line_step)
 {
+       if (verticalScrollBarPolicy() != Qt::ScrollBarAlwaysOn)
+               setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+
        verticalScrollBar()->setTracking(false);

        // do what cursor movement does (some grey)
        h += height() / 4;
@@ -516,8 +519,10 @@


 void GuiWorkArea::doGreyOut(QLPainter & pain)
 {
+       setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+
        pain.fillRectangle(0, 0, width(), height(),
                LColor::bottomarea);

        //if (!lyxrc.show_banner)

Reply via email to