Warning, /rolisteam/rolisteam/src/libraries/charactersheet/qml/Rolisteam/TextInputField.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 0002 import QtQuick.Controls 0003 0004 TextField { 0005 id:root 0006 0007 property alias backgroundColor: back.color 0008 0009 property bool clippedText: false 0010 property alias hAlign: root.horizontalAlignment 0011 property alias vAlign: root.verticalAlignment 0012 property string tooltip: "" 0013 bottomPadding: 0 0014 topPadding: 0 0015 padding: 0 0016 clip: root.clippedText 0017 0018 function computeSizeFont() 0019 { 0020 if(parent.clippedText) 0021 { 0022 while((contentWidth>root.width)&&(font.pointSize>1)&&(root.width>0)) 0023 { 0024 font.pointSize-=1 0025 } 0026 while((contentWidth+2<width)&&(contentHeight+2<height)) 0027 { 0028 font.pointSize+=1 0029 } 0030 } 0031 } 0032 0033 selectByMouse: true 0034 0035 ToolTip.text: root.tooltip 0036 ToolTip.visible:root.tooltip.length >0 &&textInput.activeFocus 0037 0038 background: Rectangle { 0039 id: back 0040 } 0041 onWidthChanged: { 0042 computeSizeFont(); 0043 } 0044 }