• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SDK center image (logo) in the custom sections to the Plug-in Manager

Participant ,
Apr 16, 2022 Apr 16, 2022

Copy link to clipboard

Copied

In a custom section of the plug-in manager I want to center a logo.

I tried several things, but nothing works. Seems that most layout properties work on the text controls.

Any suggestions?

TOPICS
SDK

Views

125

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 16, 2022 Apr 16, 2022

I've always found layout of controls fussy. To center a picture or any other control, I generally use this idiom:

f:row {fill_horizontal = 1,
    f:spacer {fill_horizontal = 1},
    f:picture {...},
    f:spacer {fill_horizontal = 1}}

The row will expand to fill the width of its container, and the two spacers will then expand equally in that width. You can omit the row if the container has a width determined by its other contents.

 

To left-justify the control, omit the second spacer, and to right-j

...

Votes

Translate

Translate
LEGEND ,
Apr 16, 2022 Apr 16, 2022

Copy link to clipboard

Copied

I've always found layout of controls fussy. To center a picture or any other control, I generally use this idiom:

f:row {fill_horizontal = 1,
    f:spacer {fill_horizontal = 1},
    f:picture {...},
    f:spacer {fill_horizontal = 1}}

The row will expand to fill the width of its container, and the two spacers will then expand equally in that width. You can omit the row if the container has a width determined by its other contents.

 

To left-justify the control, omit the second spacer, and to right-justify it, omit the first spacer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 16, 2022 Apr 16, 2022

Copy link to clipboard

Copied

LATEST

John, you are a hero!

 

Smart solution. Works great.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines