<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>315400</bug_id>
          
          <creation_ts>2013-02-18 17:33:34 +0000</creation_ts>
          <short_desc>Dialog windows draw extra internal margins</short_desc>
          <delta_ts>2020-10-04 15:29:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>Breeze</product>
          <component>QStyle</component>
          <version>5.19.5</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>usability</keywords>
          <priority>NOR</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>303462</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter>rockonthemoonfm</reporter>
          <assigned_to name="kdelibs bugs">kdelibs-bugs-null</assigned_to>
          <cc>cfeck</cc>
    
    <cc>kdelibs-bugs-null</cc>
    
    <cc>nate</cc>
    
    <cc>popov895</cc>
          
          <cf_commitlink>https://cgit.kde.org/breeze.git/commit/?id=e15989fb1f0d73200e5a328b86170af85457a114</cf_commitlink>
          <cf_versionfixedin>5.17.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1343034</commentid>
    <comment_count>0</comment_count>
    <who name="">rockonthemoonfm</who>
    <bug_when>2013-02-18 17:33:34 +0000</bug_when>
    <thetext>you can see that Open/Save dialog has double margins around the window.


Reproducible: Always



Expected Results:  
normal margin, correct ui.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1343906</commentid>
    <comment_count>1</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2013-02-20 23:33:03 +0000</bug_when>
    <thetext>There are no double margins, but the margin should only be applied to the lower part of the window, not the complete window.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1381351</commentid>
    <comment_count>2</comment_count>
    <who name="">rockonthemoonfm</who>
    <bug_when>2013-07-04 16:43:15 +0000</bug_when>
    <thetext>bug still valid for 4.11 beta 2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1714063</commentid>
    <comment_count>3</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2017-11-28 21:39:51 +0000</bug_when>
    <thetext>Still present in Plasma 5.11.3. It&apos;s not so much that file chooser dialog windows have double borders, but rather that they their UI elements are inset a bit. So even if you set the use the No Borders setting, the dialogs still *effectively and visually* show a border.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1866137</commentid>
    <comment_count>4</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2019-06-28 21:39:56 +0000</bug_when>
    <thetext>Fixed with changes in Breeze: https://cgit.kde.org/breeze.git/commit/?id=e15989fb1f0d73200e5a328b86170af85457a114</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961271</commentid>
    <comment_count>5</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-09-29 17:58:08 +0000</bug_when>
    <thetext>I closed this incorrectly, sorry. The issue--if any--is that dialog windows have larger internal padding compared to non-dialog windows. As a result, when window-decoration-drawn window borders are turned on, dialog windows have implausibly enormous borders, and when windeco borders are turned off, it looks like they are still on.

Probably what we need to do is to make dialog windows have no extra internal margins, and instead add margins only ad needed to the actual content items within the dialogs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961273</commentid>
    <comment_count>6</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-09-29 18:01:17 +0000</bug_when>
    <thetext>*** Bug 427032 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961324</commentid>
    <comment_count>7</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-09-29 20:27:49 +0000</bug_when>
    <thetext>Actually now I&apos;m not sure whether these extra margins come from Breeze, or some frameworks component that generates the dialog.

Christoph, any chance you know off the top of your head?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961489</commentid>
    <comment_count>8</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2020-09-30 00:37:23 +0000</bug_when>
    <thetext>I am not sure if I understand the issue, but could you check if breeze returns different values for PM_Layout*Margin and (deprecated) PM_DefaultTopLevelMargin?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961573</commentid>
    <comment_count>9</comment_count>
    <who name="popov895">popov895</who>
    <bug_when>2020-09-30 08:33:58 +0000</bug_when>
    <thetext>Can you try

&gt; m_processList.setContentsMargins(0,0,0,0);
See https://invent.kde.org/himanshur/ksysguard/-/blob/master/gui/SensorDisplayLib/ProcessController.cpp#L148</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961674</commentid>
    <comment_count>10</comment_count>
    <who name="popov895">popov895</who>
    <bug_when>2020-09-30 18:19:26 +0000</bug_when>
    <thetext>(In reply to popov895 from comment #9)
&gt; Can you try
&gt; 
&gt; &gt; m_processList.setContentsMargins(0,0,0,0);
&gt; See
&gt; https://invent.kde.org/himanshur/ksysguard/-/blob/master/gui/
&gt; SensorDisplayLib/ProcessController.cpp#L148
Ohh, of course it doesn&apos;t make the margins smaller. Shame on me:(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1962391</commentid>
    <comment_count>11</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-10-04 15:29:00 +0000</bug_when>
    <thetext>Breeze does:

} else if (auto dialog = qobject_cast&lt;const QDialog*&gt;(widget)) {
    auto margins = dialog-&gt;contentsMargins();
    const_cast&lt;QDialog*&gt;(dialog)-&gt;setContentsMargins(margins.left(), qMax(margins.top(), 1), margins.right(), margins.bottom());
    painter-&gt;setPen(QPen(_helper-&gt;separatorColor(_toolsAreaManager-&gt;palette()), PenWidth::Frame * widget-&gt;devicePixelRatio()));
    painter-&gt;drawLine(widget-&gt;rect().topLeft(), widget-&gt;rect().topRight());
}


...But this doesn&apos;t seem to be responsible.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>