fix: don't indent inner namespaces (#6235)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user