JANITORIAL: Formatting fixes

This commit is contained in:
av-dx 2021-07-08 16:03:17 +05:30 committed by Eugene Sandulenko
parent 6b5c5ae0d6
commit 1f18febade
5 changed files with 15 additions and 20 deletions

View file

@ -186,7 +186,7 @@ LauncherDialog::~LauncherDialog() {
void LauncherDialog::clean() {
while (_firstWidget) {
Widget* w = _firstWidget;
Widget *w = _firstWidget;
removeWidget(w);
// This is called from rebuild() which may result from handleCommand being called by
// a child widget sendCommand call. In such a case sendCommand is still being executed
@ -287,7 +287,7 @@ void LauncherDialog::reflowLayout() {
close();
return;
}
#ifndef DISABLE_FANCY_THEMES
#ifndef DISABLE_FANCY_THEMES
if (g_gui.xmlEval()->getVar("Globals.ShowLauncherLogo") == 1 && g_gui.theme()->supportsImages()) {
StaticTextWidget *ver = (StaticTextWidget *)findWidget(String(_title + ".Version").c_str());
if (ver) {

View file

@ -38,7 +38,7 @@ namespace GUI {
#ifndef DISABLE_LAUNCHERDISPLAY_GRID
enum LauncherDisplayType {
kLauncherDisplayList = 1,
kLauncherDisplayGrid = 2,
kLauncherDisplayGrid = 2
};
enum {
@ -175,9 +175,9 @@ public:
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
void handleKeyDown(Common::KeyState state) override;
#ifndef DISABLE_LAUNCHERDISPLAY_GRID
#ifndef DISABLE_LAUNCHERDISPLAY_GRID
LauncherDisplayType getType() const override { return kLauncherDisplayList; }
#endif // !DISABLE_LAUNCHERDISPLAY_GRID
#endif // !DISABLE_LAUNCHERDISPLAY_GRID
protected:
void updateListing() override;

View file

@ -58,8 +58,7 @@ void LauncherChooser::selectLauncher() {
delete _impl;
_impl = nullptr;
switch (requestedType)
{
switch (requestedType) {
case kLauncherDisplayGrid:
_impl = new LauncherGrid(Common::U32String("LauncherGrid"));
break;

View file

@ -101,8 +101,8 @@ void GridItemWidget::drawWidget() {
_activeEntry->title.substr(breakPoint), GUI::ThemeEngine::kStateEnabled ,Graphics::kTextAlignCenter,
ThemeEngine::kTextInversionNone, 0, true, ThemeEngine::kFontStyleNormal,
ThemeEngine::kFontColorAlternate, false);
}
else g_gui.theme()->drawSurface(Common::Point(_x, _y), _thumbGfx, true);
} else
g_gui.theme()->drawSurface(Common::Point(_x, _y), _thumbGfx, true);
// Draw Platform Icon
if (_activeEntry->platform != kPlatformUnknown) {
@ -195,8 +195,7 @@ GridItemTray::GridItemTray(GuiObject *boss, int x, int y, int w, int h, int entr
}
void GridItemTray::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd)
{
switch (cmd) {
case kPlayButtonCmd:
close();
sendCommand(kPlayButtonCmd, _entryID);
@ -365,7 +364,7 @@ GridWidget::~GridWidget() {
}
const Graphics::ManagedSurface *GridWidget::filenameToSurface(const String &name) {
String path = String("./icons/")+name;
String path = String("./icons/") + name;
for (auto l = _visibleEntries.begin(); l!=_visibleEntries.end(); ++l) {
if (l->thumbPath == name) {
@ -435,7 +434,7 @@ void GridWidget::reloadThumbnails() {
String path;
for (Common::Array<GridItemInfo>::iterator iter = _visibleEntries.begin(); iter != _visibleEntries.end(); ++iter) {
path = String("./icons/")+iter->thumbPath;
path = String("./icons/") + iter->thumbPath;
if (_loadedSurfaces.contains(path)) {
// warning("Thumbnail already loaded, skipping...");
} else {
@ -445,8 +444,7 @@ void GridWidget::reloadThumbnails() {
_loadedSurfaces[path] = scSurf;
surf->free();
delete surf;
}
else {
} else {
_loadedSurfaces[path] = nullptr;
}
}
@ -463,8 +461,7 @@ void GridWidget::loadFlagIcons() {
_loadedSurfaces[path] = scGfx;
gfx->free();
delete gfx;
}
else {
} else {
_loadedSurfaces[path] = nullptr;
}
}

View file

@ -55,12 +55,11 @@ enum {
kLoadButtonCmd = 'LOAD',
kOpenTrayCmd = 'OPTR',
kItemClicked = 'LBX1',
kItemDoubleClickedCmd = 'LBX2',
kItemDoubleClickedCmd = 'LBX2'
};
/* GridItemInfo */
struct GridItemInfo
{
struct GridItemInfo {
typedef Common::String String;
String engineid;