~zsombi/ubuntu-ui-toolkit/theme-as-singleton

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/Label.qml

  • Committer: Tarmac
  • Author(s): Florian Boucault
  • Date: 2014-01-24 11:56:52 UTC
  • mfrom: (901.1.7 rtl_support)
  • Revision ID: tarmac-20140124115652-nx51bfyrt68bna8e
Added Right-to-Left languages support to most widgets and to the UI Toolkit Gallery.
  
The following widgets now behave properly in RTL environments:
  - List Items
  - Popups
  - Slider
  - TextArea
  - TextField
  - Button
  - ProgressBar
  - Toolbar
  - Header
  - Switch
  
Tabs still need to be reversed.
Relayout issues had to be workarounded (QTBUG 35095) for Label and Row.
. Fixes: https://bugs.launchpad.net/bugs/1181740.

Approved by PS Jenkins bot, Zsombor Egri.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    font.pixelSize: FontUtils.sizeToPixels(fontSize)
58
58
    font.family: "Ubuntu"
59
59
    color: Theme.palette.selected.backgroundText
 
60
 
 
61
    /* FIXME: workaround for QTBUG 35095 where Text's alignment is incorrect
 
62
       when the width changes and LayoutMirroring is enabled.
 
63
 
 
64
       Ref.: https://bugreports.qt-project.org/browse/QTBUG-35095
 
65
    */
 
66
    /*! \internal */
 
67
    onWidthChanged: if (LayoutMirroring.enabled) {
 
68
                        // force a relayout
 
69
                        lineHeight += 0.00001;
 
70
                        lineHeight -= 0.00001;
 
71
                    }
60
72
}