Skip to content

Commit fdfa974

Browse files
committed
Rename NanoWidget to NanoSubWidget across widget headers
DPF deprecated 'NanoWidget' in favor of 'NanoSubWidget' during the 2020 -> 2026 timespan; the old name is now a deprecation-tagged typedef alias. The override in tabview.hpp explicitly named the base class to call setVisible, which triggered the warning every build. Replace 'NanoWidget' with 'NanoSubWidget' in tabview.hpp, textview.hpp, scrollbar.hpp, label.hpp, and splash.hpp. No semantic change — these are typedef-aliased to the same class. Just matches upstream's current canonical name and silences the deprecation.
1 parent e32e3d2 commit fdfa974

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

plugin/dpf/common/gui/label.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525

2626
#include <string>
2727

28-
class Label : public NanoWidget {
28+
class Label : public NanoSubWidget {
2929
public:
3030
bool drawBorder = false;
3131

3232
explicit Label(
3333
NanoTopLevelWidget *group, std::string labelText, FontId fontId, Palette &palette)
34-
: NanoWidget(group), labelText(labelText), fontId(fontId), pal(palette)
34+
: NanoSubWidget(group), labelText(labelText), fontId(fontId), pal(palette)
3535
{
3636
}
3737

plugin/dpf/common/gui/scrollbar.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
#include <cmath>
2626
#include <memory>
2727

28-
template<typename Scrollable> class ScrollBar : public NanoWidget {
28+
template<typename Scrollable> class ScrollBar : public NanoSubWidget {
2929
public:
3030
explicit ScrollBar(
3131
NanoTopLevelWidget *group, std::shared_ptr<Scrollable> parent, Palette &palette)
32-
: NanoWidget(group), parent(parent), pal(palette)
32+
: NanoSubWidget(group), parent(parent), pal(palette)
3333
{
3434
}
3535

plugin/dpf/common/gui/splash.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
#include <sstream>
2525
#include <string>
2626

27-
class CreditSplash : public NanoWidget {
27+
class CreditSplash : public NanoSubWidget {
2828
public:
2929
explicit CreditSplash(
3030
NanoTopLevelWidget *group, std::string name, FontId fontId, Palette &palette)
31-
: NanoWidget(group), name(name), fontId(fontId), pal(palette)
31+
: NanoSubWidget(group), name(name), fontId(fontId), pal(palette)
3232
{
3333
hide();
3434
}
@@ -89,11 +89,11 @@ class CreditSplash : public NanoWidget {
8989
Palette &pal;
9090
};
9191

92-
class SplashButton : public NanoWidget {
92+
class SplashButton : public NanoSubWidget {
9393
public:
9494
explicit SplashButton(
9595
NanoTopLevelWidget *group, std::string labelText, FontId fontId, Palette &palette)
96-
: NanoWidget(group), labelText(labelText), fontId(fontId), pal(palette)
96+
: NanoSubWidget(group), labelText(labelText), fontId(fontId), pal(palette)
9797
{
9898
}
9999

plugin/dpf/common/gui/tabview.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
#include <iostream>
3232

33-
class TabView : public NanoWidget {
33+
class TabView : public NanoSubWidget {
3434
public:
3535
struct TabButton {
3636
std::string name;
@@ -71,7 +71,7 @@ class TabView : public NanoWidget {
7171
float top,
7272
float width,
7373
float height)
74-
: NanoWidget(group), tabHeight(tabHeight), fontId(fontId), pal(palette)
74+
: NanoSubWidget(group), tabHeight(tabHeight), fontId(fontId), pal(palette)
7575
{
7676
setAbsolutePos(left, top);
7777
setSize(width, height);
@@ -121,7 +121,7 @@ class TabView : public NanoWidget {
121121
}
122122
}
123123

124-
NanoWidget::setVisible(yesNo);
124+
NanoSubWidget::setVisible(yesNo);
125125
}
126126

127127
void onNanoDisplay() override

plugin/dpf/common/gui/textview.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
#include <sstream>
2626
#include <string>
2727

28-
class TextView : public NanoWidget {
28+
class TextView : public NanoSubWidget {
2929
public:
3030
float textSize = 18.0f;
3131

3232
explicit TextView(
3333
NanoTopLevelWidget *group, std::string content, FontId fontId, Palette &palette)
34-
: NanoWidget(group), fontId(fontId), pal(palette)
34+
: NanoSubWidget(group), fontId(fontId), pal(palette)
3535
{
3636
std::stringstream ss(content);
3737
std::string line;
@@ -64,7 +64,7 @@ class TextView : public NanoWidget {
6464
int align = ALIGN_BASELINE | ALIGN_MIDDLE;
6565
};
6666

67-
class TextTableView : public NanoWidget {
67+
class TextTableView : public NanoSubWidget {
6868
public:
6969
const char rowDelimiter = '\n';
7070
const char colDelimiter = '|';
@@ -76,7 +76,7 @@ class TextTableView : public NanoWidget {
7676
float cellWidth,
7777
FontId fontId,
7878
Palette &palette)
79-
: NanoWidget(group), cellWidth(cellWidth), fontId(fontId), pal(palette)
79+
: NanoSubWidget(group), cellWidth(cellWidth), fontId(fontId), pal(palette)
8080
{
8181
std::stringstream ssContent(content);
8282
std::string line;

0 commit comments

Comments
 (0)