mirror of
https://codeberg.org/armin/chromaflock.git
synced 2026-09-01 04:10:47 +02:00
new logo UI adaptation; replace screenshot
This commit is contained in:
parent
399d5e7a11
commit
0199ac1f0a
2 changed files with 6 additions and 6 deletions
|
|
@ -779,13 +779,13 @@ void MainContentComponent::paint(juce::Graphics& g) {
|
||||||
logoLoaded = true;
|
logoLoaded = true;
|
||||||
}
|
}
|
||||||
if (logoImage.isValid()) {
|
if (logoImage.isValid()) {
|
||||||
int gap = 8;
|
int logoW = 440;
|
||||||
int logoH = 124 - gap * 2;
|
int logoH = logoImage.getWidth() > 0
|
||||||
int logoW = logoImage.getHeight() > 0
|
? static_cast<int>(logoW * static_cast<double>(logoImage.getHeight()) / logoImage.getWidth())
|
||||||
? static_cast<int>(logoH * static_cast<double>(logoImage.getWidth()) / logoImage.getHeight())
|
: logoW;
|
||||||
: logoH;
|
|
||||||
int logoX = (getWidth() - logoW) / 2;
|
int logoX = (getWidth() - logoW) / 2;
|
||||||
auto logoArea = juce::Rectangle<int>(logoX, gap, logoW, logoH);
|
int logoY = (124 - logoH) / 2;
|
||||||
|
auto logoArea = juce::Rectangle<int>(logoX, logoY, logoW, logoH);
|
||||||
juce::Graphics::ScopedSaveState saved(g);
|
juce::Graphics::ScopedSaveState saved(g);
|
||||||
g.setOpacity(0.8f);
|
g.setOpacity(0.8f);
|
||||||
g.drawImage(logoImage, logoArea.toFloat(), juce::RectanglePlacement::centred);
|
g.drawImage(logoImage, logoArea.toFloat(), juce::RectanglePlacement::centred);
|
||||||
|
|
|
||||||
BIN
shot.png
BIN
shot.png
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 1.8 MiB |
Loading…
Add table
Add a link
Reference in a new issue