Text in Balloon is too small

Discussions about the development of the TechDraw workbench
User avatar
bitacovir
Posts: 1155
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Text in Balloon is too small

Postby bitacovir » Thu Jun 27, 2019 9:38 pm

Some observations about TechDraw Ballon

1) When I create a balloon in TDWB the text is too small. The Fontsize of the text in a balloon is 0.2mm
2) The start Start Symbol is missing.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17144 (Git)
Build type: Release
Branch: master
Hash: ece1b7ecbaa36d22403d6850d8498882d820db3c
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My personal web site
My GitHub repository
My old Blog
Mini Airflow Tunnel Project
fjullien
Posts: 61
Joined: Wed Jan 17, 2018 7:46 am
Location: France

Re: Text in Balloon is too small

Postby fjullien » Fri Jun 28, 2019 7:52 am

Hi,

Seems like it comes from language translation and how I preset the comboBox.
In my case, it searches for "Arrow" but combo text is "Flèche" (French).

What text do you have in your comboBox ?

Code: Select all

    i = ui->comboEndType->findText(QString::fromUtf8(parent->dvBalloon->EndType.getValueAsString()));
    ui->comboEndType->setCurrentIndex(i);

    i = ui->comboSymbol->findText(QString::fromUtf8(parent->dvBalloon->Symbol.getValueAsString()));
ui->comboSymbol->setCurrentIndex(i);
Need to find another way to set comboBox here.

I'm wondering if something has changed here because I didn't do any translation work myself.
I even don't know how to do that :)

Thanks anyway for reporting.

Franck.
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Text in Balloon is too small

Postby wandererfan » Fri Jun 28, 2019 11:54 am

bitacovir wrote:
Thu Jun 27, 2019 9:38 pm
1) When I create a balloon in TDWB the text is too small. The Fontsize of the text in a balloon is 0.2mm
What are your settings for these settings - ArrowSize, ArrowStyle and FontSize? Do your Dimensions look right (shared parms with balloon)?
BalloonParms.png
BalloonParms.png (67.22 KiB) Viewed 314 times
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Text in Balloon is too small

Postby wandererfan » Fri Jun 28, 2019 12:43 pm

fjullien wrote:
Fri Jun 28, 2019 7:52 am
In my case, it searches for "Arrow" but combo text is "Flèche" (French).
I can't get "Fleche" in the combo box with FC language = Francais and locale = fr_Fr or fr_Ca. It always shows "Arrow".

Anyway, OP is in Australia, so probably not using French.

Use the index for setting and getting the combo box text:

Code: Select all

//    i = ui->comboEndType->findText(QString::fromUtf8(parent->dvBalloon->EndType.getValueAsString()));
    i = parent->dvBalloon->EndType.getValue();
    ui->comboEndType->setCurrentIndex(i);

//    i = ui->comboSymbol->findText(QString::fromUtf8(parent->dvBalloon->Symbol.getValueAsString()));
    i = parent->dvBalloon->Symbol.getValue();
    ui->comboSymbol->setCurrentIndex(i);
// and 
        m_parent->dvBalloon->EndType.setValue(ui->comboEndType->currentIndex());
        m_parent->dvBalloon->Symbol.setValue(ui->comboSymbol->currentIndex());
I'm wondering if something has changed here because I didn't do any translation work myself.
The translation process pulls the literals from the ui file. Then the generated routine "void retranslateUi(QWidget *TechDrawGui__TaskBalloon)" does the translation at run time.
User avatar
bitacovir
Posts: 1155
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Text in Balloon is too small

Postby bitacovir » Fri Jun 28, 2019 2:30 pm

Hi. Thanks for your attention. I fixed the problem deleting the configuration files in AppData>Roaming>FreeCAD
With a clean installation, the text and symbols are visible again.
Anyway, Balloon is working properly now.
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My personal web site
My GitHub repository
My old Blog
Mini Airflow Tunnel Project