Commit 1677cf63 authored by t.artikov's avatar t.artikov

[VNQ-#] OffscreenEditText::setIncludeFontPadding

parent fda0b06a
......@@ -332,6 +332,14 @@ void QAndroidOffscreenEditText::setPadding(int left, int top, int right, int bot
}
}
void QAndroidOffscreenEditText::setIncludeFontPadding(bool enabled)
{
if (QJniObject * view = offscreenView())
{
view->callVoid("setIncludeFontPadding", jboolean(enabled));
}
}
void QAndroidOffscreenEditText::setPaintFlags(int flags)
{
if (QJniObject * view = offscreenView())
......
......@@ -169,6 +169,7 @@ public:
//! Sets the padding.
void setPadding(int left, int top, int right, int bottom);
void setIncludeFontPadding(bool enabled);
// http://developer.android.com/reference/android/graphics/Paint.html
static const int
......
......@@ -118,6 +118,7 @@ public slots:
//! Sets the padding.
void setPadding(int left, int top, int right, int bottom) { androidEditText()->setPadding(left, top, right, bottom); }
void setIncludeFontPadding(bool enabled) { androidEditText()->setIncludeFontPadding(enabled); }
//! Sets flags on the Paint being used to display the text and reflows the text if they are different from the old flags.
void setPaintFlags(int flags) { androidEditText()->setPaintFlags(flags); }
......
......@@ -649,6 +649,16 @@ class OffscreenEditText extends OffscreenView
});
}
void setIncludeFontPadding(final boolean enabled)
{
runViewAction(new Runnable(){
@Override
public void run(){
((MyEditText)getView()).setIncludeFontPadding(enabled);
}
});
}
void setPaintFlags(final int flags)
{
runViewAction(new Runnable(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment