<table><tr><td style="">safaalfulaij 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/D14345">View Revision</a></tr></table><br /><div><div><p>Great! Now I know why the port to PC3 didn't start :D<br />
Now to the patch. First, by this we will allow the user to get text under the icon, which will be impossible to read.<br />
Second is what I'm here for :)<br />
The clear button placement and icon should not follow the locale, but the actual text imh. You can write Arabic in an English system, and vice versa.</p>

<p>I've made this simple file to explain my point:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">import QtQuick 2.7
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3

import org.kde.plasma.core 2.0 as PlasmaCore

Item {
    width: 300
    height: 200

    LayoutMirroring.enabled: true // This value (true or false) shouldn’t affect anything regarding the Clear button!
    LayoutMirroring.childrenInherit: true

    Frame {
        anchors.centerIn: parent
        width: 200
        RowLayout {
            LayoutMirroring.enabled: false
            anchors.fill: parent
            layoutDirection: textInput.isRightToLeft(0, textInput.length) ? Qt.RightToLeft : Qt.LeftToRight
            TextField {
                id: textInput
                Layout.fillWidth: true
            }
            AbstractButton {
                contentItem: PlasmaCore.IconItem {
                    source: textInput.isRightToLeft(0, textInput.length) ? "edit-clear-locationbar-ltr" : "edit-clear-locationbar-rtl"
                }
            }
        }
    }
}</pre></div>

<p>Whatever the locale is, or the mirroring is, things inside the <tt style="background: #ebebeb; font-size: 13px;">Frame</tt> shouldn't change (well, this won't work fully as the context menu might not get rendered correctly, but I didn't want to write 4 <tt style="background: #ebebeb; font-size: 13px;">if</tt> statments in the <tt style="background: #ebebeb; font-size: 13px;">rightMargin</tt> and <tt style="background: #ebebeb; font-size: 13px;">leftMargin</tt> properties, as you can't set it to be absolute. With mirroring, right is treated as left, and vice versa)</p>

<p>Results:<br />
<a href="https://phabricator.kde.org/F6148886" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F6148886: Screenshot_٢٠١٨٠٧٢٦_٢٣٥٤١٤.png</a></p>

<p><a href="https://phabricator.kde.org/F6148887" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F6148887: Screenshot_٢٠١٨٠٧٢٦_٢٣٥٤٢٢.png</a></p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R242 Plasma Framework (Library)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14345">https://phabricator.kde.org/D14345</a></div></div><br /><div><strong>To: </strong>ngraham, Plasma, mart, davidedmundson<br /><strong>Cc: </strong>safaalfulaij, kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>