[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source

Dennis Francis (via logerrit) logerrit at kemper.freedesktop.org
Fri May 1 04:38:48 UTC 2020


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

New commits:
commit 84200fc5e1b807629de2d975acaa3ffb81640d1f
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Fri May 1 04:23:09 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Fri May 1 06:38:13 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 <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Dennis Francis <dennis.francis at collabora.com>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 14d96448f283..97a73632ee22 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1062,7 +1062,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)
     {
@@ -1075,17 +1074,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 )
@@ -1103,8 +1093,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();
@@ -1139,17 +1127,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 );


More information about the Libreoffice-commits mailing list