fix: don't indent inner namespaces (#6235)

This commit is contained in:
pajlada
2025-05-25 12:28:14 +02:00
committed by GitHub
parent 84c0b39fde
commit 8acca1c241
39 changed files with 934 additions and 951 deletions
+38 -38
View File
@@ -33,52 +33,52 @@
namespace chatterino {
namespace {
// Translates the given rectangle by an amount in the direction to appear like the tab is selected.
// For example, if location is Top, the rectangle will be translated in the negative Y direction,
// or "up" on the screen, by amount.
void translateRectForLocation(QRect &rect, NotebookTabLocation location,
int amount)
// Translates the given rectangle by an amount in the direction to appear like the tab is selected.
// For example, if location is Top, the rectangle will be translated in the negative Y direction,
// or "up" on the screen, by amount.
void translateRectForLocation(QRect &rect, NotebookTabLocation location,
int amount)
{
switch (location)
{
switch (location)
{
case NotebookTabLocation::Top:
rect.translate(0, -amount);
break;
case NotebookTabLocation::Left:
rect.translate(-amount, 0);
break;
case NotebookTabLocation::Right:
rect.translate(amount, 0);
break;
case NotebookTabLocation::Bottom:
rect.translate(0, amount);
break;
}
case NotebookTabLocation::Top:
rect.translate(0, -amount);
break;
case NotebookTabLocation::Left:
rect.translate(-amount, 0);
break;
case NotebookTabLocation::Right:
rect.translate(amount, 0);
break;
case NotebookTabLocation::Bottom:
rect.translate(0, amount);
break;
}
}
float getCompactDivider(TabStyle tabStyle)
float getCompactDivider(TabStyle tabStyle)
{
switch (tabStyle)
{
switch (tabStyle)
{
case TabStyle::Compact:
return 1.5;
case TabStyle::Normal:
default:
return 1.0;
}
case TabStyle::Compact:
return 1.5;
case TabStyle::Normal:
default:
return 1.0;
}
}
float getCompactReducer(TabStyle tabStyle)
float getCompactReducer(TabStyle tabStyle)
{
switch (tabStyle)
{
switch (tabStyle)
{
case TabStyle::Compact:
return 4.0;
case TabStyle::Normal:
default:
return 0.0;
}
case TabStyle::Compact:
return 4.0;
case TabStyle::Normal:
default:
return 0.0;
}
}
} // namespace
NotebookTab::NotebookTab(Notebook *notebook)