sc/source/ui/view/gridwin.cxx |   23 +++--------------------
 1 file changed, 3 insertions(+), 20 deletions(-)

New commits:
commit a202f29155aa60e479774a0972a88e232394a85e
Author:     Dennis Francis <dennis.fran...@collabora.com>
AuthorDate: Fri May 1 04:23:09 2020 +0530
Commit:     Dennis Francis <dennis.fran...@collabora.com>
CommitDate: Fri May 1 07:28:27 2020 +0200

    Revert "lokit: scale the validation dropdown with client zoom"
    
    The scaling of the float window containg the listbox is unfortunately
    far from ideal at certain zoom levels and entry sizes. There are issues
    like too much extra spaces around the entries and around scrollbar if
    present. These issues need more work to fix. Until then lets revert
    this.
    
    Another issue is that we don't really want to zoom adjust any popups in
    mobile or android as this does not match the design of jsdialogs.
    
    This reverts the commit :
    7787bac16cbe63698f56a9a70d9b1b217f3ea860 (master)
    a87e78df635d4a8e745bfffcf33d022d2a498afa (cp62)
    
    Change-Id: Ic31040b491e25b5113dfc8e70d3f73de204862e0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93239
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Dennis Francis <dennis.fran...@collabora.com>
    (cherry picked from commit 84200fc5e1b807629de2d975acaa3ffb81640d1f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93137
    Tested-by: Jenkins

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 59a4d6b60d35..26c2d6eb7b7f 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1073,7 +1073,6 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, 
SCROW nRow )
     pViewData->GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY );
     Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich );
     bool bLOKActive = comphelper::LibreOfficeKit::isActive();
-    double fListWindowZoom = 1.0;
 
     if (bLOKActive)
     {
@@ -1086,17 +1085,8 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, 
SCROW nRow )
         double fZoomY(pViewData->GetZoomY());
         aPos.setX(aPos.getX() / fZoomX);
         aPos.setY(aPos.getY() / fZoomY);
-        // Reverse the zooms from sizes too
-        // nSizeX : because we need to rescale with another (trimmed) zoom 
level below.
         nSizeX = nSizeX / fZoomX;
-        // nSizeY : because this is used by vcl::FloatingWindow later to 
compute its vertical position
-        // since we pass the flag FloatWinPopupFlags::Down setup the popup.
         nSizeY = nSizeY / fZoomY;
-        // Limit zoom scale for Listwindow in the dropdown.
-        fListWindowZoom = std::max(std::min(fZoomY, 2.0), 0.5);
-        // nSizeX is only used in setting the width of dropdown, so rescale 
with
-        // the trimmed zoom.
-        nSizeX = nSizeX * fListWindowZoom;
     }
 
     if ( bLayoutRTL )
@@ -1114,8 +1104,6 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, 
SCROW nRow )
     }
     mpFilterFloat->SetPopupModeEndHdl(LINK( this, ScGridWindow, 
PopupModeEndHdl));
     mpFilterBox.reset(VclPtr<ScFilterListBox>::Create(mpFilterFloat.get(), 
this, nCol, nRow, ScFilterBoxMode::DataSelect));
-    if (bLOKActive)
-        mpFilterBox->SetZoom(Fraction(fListWindowZoom));
     // Fix for bug fdo#44925
     if (AllSettings::GetLayoutRTL() != bLayoutRTL)
         mpFilterBox->EnableMirroring();
@@ -1150,17 +1138,12 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, 
SCROW nRow )
         //! Check first if the entries fit (width)
 
         // minimum width in pixel
-        const long nMinLOKWinWidth = static_cast<long>(1.3 * STD_COL_WIDTH * 
pViewData->GetPPTX());
+        const long nMinLOKWinWidth = static_cast<long>(1.3 * STD_COL_WIDTH / 
TWIPS_PER_PIXEL);
         if (bLOKActive && nSizeX < nMinLOKWinWidth)
             nSizeX = nMinLOKWinWidth;
 
-        if (bLOKActive)
-        {
-            if (aStrings.size() < SC_FILTERLISTBOX_LINES)
-                nHeight = nHeight * (aStrings.size() + 1) / 
SC_FILTERLISTBOX_LINES;
-
-            nHeight = nHeight * fListWindowZoom;
-        }
+        if (bLOKActive && aStrings.size() < SC_FILTERLISTBOX_LINES)
+            nHeight = nHeight * (aStrings.size() + 1) / SC_FILTERLISTBOX_LINES;
 
         Size aParentSize = GetParent()->GetOutputSizePixel();
         Size aSize( nSizeX, nHeight );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to