Improve window scalability

This commit is contained in:
Jaidyn Ann 2021-03-12 19:27:44 -06:00
parent daf355f733
commit 2497569132
4 changed files with 16 additions and 14 deletions

View File

@ -5,14 +5,11 @@ Important Features:
Important improvements: Important improvements:
* Memory leaks * Memory leaks
* ~.05MB per feed on download (+2MB w 40 feeds) * ~.05MB per feed on download, in Util.ccp, fetch(). I'm stumped here.
* This leak is in Util.ccp, fetch(). I'm stumped here. * ~.02MB per feed on parsing
* ~.02MB per feed on parsing (+1MB w 40 feeds)
* Fix background of Feeds List error status icon (it's black, not transparent) * Fix background of Feeds List error status icon (it's black, not transparent)
* Make UI friendly to whatever font-size you throw at it
* Give a max size to the progress label in FeedsView
* Make fancy Markdown README * Make fancy Markdown README
* Make an icon, somehow (idk I'm not an artist) * Make an icon(idk I'm not an artist)
Nice Improvements: Nice Improvements:

View File

@ -174,7 +174,6 @@ EntriesView::_InitInterface()
_PopulateOpenWithMenu(); _PopulateOpenWithMenu();
BLayoutBuilder::Group<>(fSavingBox, B_HORIZONTAL) BLayoutBuilder::Group<>(fSavingBox, B_HORIZONTAL)
.SetInsets(B_USE_ITEM_INSETS) .SetInsets(B_USE_ITEM_INSETS)
.AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING) .AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING)
@ -211,10 +210,9 @@ EntriesView::_InitInterface()
.End() .End()
.End(); .End();
BLayoutBuilder::Group<>(this, B_VERTICAL, 0) BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_ITEM_SPACING)
.SetInsets(B_USE_DEFAULT_SPACING) .SetInsets(B_USE_DEFAULT_SPACING)
.Add(fSavingBox) .Add(fSavingBox)
.AddGlue()
.Add(fOpeningBox) .Add(fOpeningBox)
.AddGlue() .AddGlue()
.End(); .End();

View File

@ -26,7 +26,7 @@
MainWindow::MainWindow() MainWindow::MainWindow()
: :
BWindow(((App*)be_app)->fPreferences->fMainWindowRect, "Pogger", BWindow(((App*)be_app)->fPreferences->fMainWindowRect, "Pogger",
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE) B_TITLED_WINDOW, NULL)
{ {
_InitInterface(); _InitInterface();
MoveOnScreen(); MoveOnScreen();
@ -104,13 +104,21 @@ MainWindow::_InitInterface()
// Bottom bar // Bottom bar
fStatusBar = new BStatusBar("feedProgress"); fStatusBar = new BStatusBar("feedProgress");
fUpdateNowButton = new BButton("updateNow", "Update Now", fUpdateNowButton = new BButton("updateNow", "Update Now",
new BMessage(kUpdateSubscribed)); new BMessage(kUpdateSubscribed));
fUpdateNowButton->SetTarget((App*)be_app); fUpdateNowButton->SetTarget((App*)be_app);
fUpdateNowButton->SetExplicitAlignment( fUpdateNowButton->SetExplicitAlignment(
BAlignment(B_ALIGN_RIGHT, B_ALIGN_MIDDLE)); BAlignment(B_ALIGN_RIGHT, B_ALIGN_MIDDLE));
// Window size
font_height fontHeight;
fTabView->GetFontHeight(&fontHeight);
int16 fsize = fontHeight.ascent + fontHeight.descent;
float minWidth = 36 * fsize;
float minHeight = 25 * fsize;
SetSizeLimits(minWidth, 100000, minHeight, 100000);
if (Size().Height() < minHeight || Size().Width() < minWidth)
ResizeTo(minWidth, minHeight);
BLayoutBuilder::Group<>(this, B_VERTICAL, 0) BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.SetInsets(0, B_USE_DEFAULT_SPACING, 0, 0) .SetInsets(0, B_USE_DEFAULT_SPACING, 0, 0)

View File

@ -118,10 +118,9 @@ UpdatesView::_InitInterface()
.Add(fIntervalSlider) .Add(fIntervalSlider)
.End(); .End();
BLayoutBuilder::Group<>(this, B_VERTICAL, 0) BLayoutBuilder::Group<>(this, B_VERTICAL, B_USE_ITEM_SPACING)
.SetInsets(B_USE_DEFAULT_SPACING) .SetInsets(B_USE_DEFAULT_SPACING)
.Add(fNotificationsBox) .Add(fNotificationsBox)
.AddGlue()
.Add(fSchedulingBox) .Add(fSchedulingBox)
.AddGlue() .AddGlue()
.End(); .End();