<table><tr><td style="">davidedmundson added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D26806">View Revision</a></tr></table><br /><div><div><p>With any layout changes be sure you've tested it:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">in the system tray</li>
<li class="remarkup-list-item">in the panel</li>
<li class="remarkup-list-item">in a vertical panel</li>
<li class="remarkup-list-item">on the desktop</li>
</ul></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D26806#inline-151579">View Inline</a><span style="color: #4b4d51; font-weight: bold;">BatteryItem.qml:96</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; "> <span style="color: #004012">RowLayout</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="bright"> </span><span style="color: #aa4000"><span class="bright">id: infoRow</span></span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">width:</span> <span style="color: #004012">parent</span><span class="p">.</span><span style="color: #004012">width</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">spacing:</span> <span style="color: #004012">units</span><span class="p">.</span><span style="color: #004012">gridUnit</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="bright"></span><span style="color: #aa4000"><span class="bright">width:</span></span><span class="bright"> </span><span style="color: #004012"><span class="bright">batteryItem</span></span><span class="bright"></span><span class="p"><span class="bright">.</span></span><span class="bright"></span><span style="color: #004012"><span class="bright">width</span></span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">We want to almost never specify a width inside a layout</p>
<p style="padding: 0; margin: 8px;">It's the layout's job to change the item's width, which means when it re does the layout this information gets lost.</p>
<p style="padding: 0; margin: 8px;">Instead, we want to set an implicitWidth or Layout.preferredWidth</p>
<p style="padding: 0; margin: 8px;">This applies throughout</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D26806#inline-151580">View Inline</a><span style="color: #4b4d51; font-weight: bold;">PowerManagementItem.qml:69</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #004012">suppressHint</span><span class="p">.</span><span style="color: #004012">visible</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #004012">mainMessage</span> <span style="color: #aa2211">+=</span> <span style="color: #004012">i18n</span><span class="p">(</span><span style="color: #766510">"\n"</span><span class="p">)</span> <span style="color: #aa2211">+</span> <span style="color: #004012">suppressHint</span><span class="p">.</span><span style="color: #004012">text</span>
</div><div style="padding: 0 8px; margin: 0 4px; "> <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #004012">Column</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #004012">anchors</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">left:</span> <span style="color: #004012">parent</span><span class="p">.</span><span style="color: #004012">left</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">leftMargin:</span> <span style="color: #004012">units</span><span class="p">.</span><span style="color: #004012">iconSizes</span><span class="p">.</span><span style="color: #004012">medium</span> <span style="color: #aa2211">+</span> <span style="color: #004012">units</span><span class="p">.</span><span style="color: #004012">gridUnit</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">right:</span> <span style="color: #004012">parent</span><span class="p">.</span><span style="color: #004012">right</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">spacing:</span> <span style="color: #004012">units</span><span class="p">.</span><span style="color: #004012">smallSpacing</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #004012">InhibitionHint</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">width:</span> <span style="color: #004012">parent</span><span class="p">.</span><span style="color: #004012">width</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">visible:</span> <span style="color: #004012">pmSource</span><span class="p">.</span><span style="color: #004012">data</span><span class="p">[</span><span style="color: #766510">"PowerDevil"</span><span class="p">]</span> <span style="color: #aa2211">&&</span> <span style="color: #004012">pmSource</span><span class="p">.</span><span style="color: #004012">data</span><span class="p">[</span><span style="color: #766510">"PowerDevil"</span><span class="p">][</span><span style="color: #766510">"Is Lid Present"</span><span class="p">]</span> <span style="color: #aa2211">&&</span> <span style="color: #aa2211">!</span><span style="color: #004012">pmSource</span><span class="p">.</span><span style="color: #004012">data</span><span class="p">[</span><span style="color: #766510">"PowerDevil"</span><span class="p">][</span><span style="color: #766510">"Triggers Lid Action"</span><span class="p">]</span> <span style="color: #aa2211">?</span> <span style="color: #aa4000">true :</span> <span style="color: #000a65">false</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">iconSource:</span> <span style="color: #766510">"computer-laptop"</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">text:</span> <span style="color: #004012">i18n</span><span class="p">(</span><span style="color: #766510">"Your notebook is configured not to suspend when closing the lid while an external monitor is connected."</span><span class="p">)</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #004012">InhibitionHint</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">width:</span> <span style="color: #004012">parent</span><span class="p">.</span><span style="color: #004012">width</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">visible:</span> <span style="color: #004012">inhibitions</span><span class="p">.</span><span style="color: #004012">length</span> <span style="color: #aa2211">></span> <span style="color: #601200">0</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">iconSource:</span> <span style="color: #004012">inhibitions</span><span class="p">.</span><span style="color: #004012">length</span> <span style="color: #aa2211">></span> <span style="color: #601200">0</span> <span style="color: #aa2211">?</span> <span style="color: #004012">inhibitions</span><span class="p">[</span><span style="color: #601200">0</span><span class="p">].</span><span style="color: #004012">Icon</span> <span style="color: #aa2211">||</span> <span style="color: #766510">""</span> <span style="color: #aa2211">:</span> <span style="color: #766510">""</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">text:</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #004012">inhibitions</span><span class="p">.</span><span style="color: #004012">length</span> <span style="color: #aa2211">></span> <span style="color: #601200">1</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">return</span> <span style="color: #004012">i18ncp</span><span class="p">(</span><span style="color: #766510">"Some Application and n others are currently suppressing PM"</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #766510">"%2 and %1 other application are currently suppressing power management."</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #766510">"%2 and %1 other applications are currently suppressing power management."</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #004012">inhibitions</span><span class="p">.</span><span style="color: #004012">length</span> <span style="color: #aa2211">-</span> <span style="color: #601200">1</span><span class="p">,</span> <span style="color: #004012">inhibitions</span><span class="p">[</span><span style="color: #601200">0</span><span class="p">].</span><span style="color: #004012">Name</span><span class="p">)</span> <span style="color: #74777d">// plural only works on %1</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span class="p">}</span> <span style="color: #aa4000">else</span> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #004012">inhibitions</span><span class="p">.</span><span style="color: #004012">length</span> <span style="color: #aa2211">===</span> <span style="color: #601200">1</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span style="color: #004012">inhibitions</span><span class="p">[</span><span style="color: #601200">0</span><span class="p">].</span><span style="color: #004012">Reason</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #aa4000">return</span> <span style="color: #004012">i18nc</span><span class="p">(</span><span style="color: #766510">"Some Application is suppressing PM"</span><span class="p">,</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);"> <span style="color: #766510">"%1 is currently suppressing power management."</span><span class="p">,</span> <span style="color: #004012">inhibitions</span><span class="p">[</span><span style="color: #601200">0</span><span class="p">].</span><span style="color: #004012">Name</span><span class="p">)</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">there's no point translating "\n"</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26806">https://phabricator.kde.org/D26806</a></div></div><br /><div><strong>To: </strong>gvgeo, Plasma, VDG<br /><strong>Cc: </strong>davidedmundson, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>