rename SideBar to SidebarOnDemand

--improve semantics all over the place now
that we provide two different sidebar
visibility modes
pull/19/head
Michail Vourlakos 5 years ago
parent 0784c0dacd
commit 3b3388d673

@ -69,7 +69,7 @@ private:
QList<Latte::Types::Visibility> m_ignoreModes{
Latte::Types::AutoHide,
Latte::Types::SideBar,
Latte::Types::SidebarOnDemand,
Latte::Types::SidebarAutoHide
};

@ -427,7 +427,7 @@ void Effects::updateEffects()
QRegion backMask = m_background->mask();
//! There are cases that mask is NULL even though it should not
//! Example: SideBar from v0.10 that BEHAVEASPLASMAPANEL in EditMode
//! Example: SidebarOnDemand from v0.10 that BEHAVEASPLASMAPANEL in EditMode
//! switching multiple times between inConfigureAppletsMode and LiveEditMode
//! is such a case
QRegion fixedMask;

@ -464,7 +464,7 @@ void Positioner::immediateSyncGeometry()
int fixedScreen = m_view->onPrimary() ? latteCorona->screenPool()->primaryScreenId() : m_view->containment()->screen();
QList<Types::Visibility> ignoreModes({Latte::Types::AutoHide,
Latte::Types::SideBar,
Latte::Types::SidebarOnDemand,
Latte::Types::SidebarAutoHide});
QList<Plasma::Types::Location> ignoreEdges({Plasma::Types::LeftEdge,

@ -304,10 +304,10 @@ void PrimaryConfigView::instantUpdateAvailableScreenGeometry()
int currentScrId = m_latteView->positioner()->currentScreenId();
QList<Latte::Types::Visibility> ignoreModes{Latte::Types::SideBar,Latte::Types::SidebarAutoHide};
QList<Latte::Types::Visibility> ignoreModes{Latte::Types::SidebarOnDemand,Latte::Types::SidebarAutoHide};
if (m_latteView->visibility() && m_latteView->visibility()->isSidebar()) {
ignoreModes.removeAll(Latte::Types::SideBar);
ignoreModes.removeAll(Latte::Types::SidebarOnDemand);
ignoreModes.removeAll(Latte::Types::SidebarAutoHide);
}

@ -317,7 +317,7 @@ void VisibilityManager::setMode(Latte::Types::Visibility mode)
case Types::WindowsAlwaysCover:
break;
case Types::SideBar:
case Types::SidebarOnDemand:
m_connections[base] = connect(m_latteView, &Latte::View::inEditModeChanged, this, [&]() {
if (!m_latteView->inEditMode()) {
//! Give the time to View to change from !behaveAsPlasmaPanel to behaveAsPlasmaPanel
@ -611,7 +611,7 @@ void VisibilityManager::setTimerHide(int msec)
bool VisibilityManager::isSidebar() const
{
return m_mode == Latte::Types::SideBar || m_mode == Latte::Types::SidebarAutoHide;
return m_mode == Latte::Types::SidebarOnDemand || m_mode == Latte::Types::SidebarAutoHide;
}
bool VisibilityManager::supportsKWinEdges() const
@ -667,7 +667,7 @@ void VisibilityManager::show()
void VisibilityManager::raiseView(bool raise)
{
if (hidingIsBlocked() || m_mode == Latte::Types::SideBar)
if (hidingIsBlocked() || m_mode == Latte::Types::SidebarOnDemand)
return;
if (raise) {

@ -107,7 +107,7 @@ public:
bool supportsKWinEdges() const;
//! Used mostly to show / hide SideBars
//! Used mostly to show / hide Sidebars
void toggleHiddenState();
public slots:

@ -189,7 +189,7 @@ private:
Latte::Types::WindowsGoBelow,
Latte::Types::WindowsCanCover,
Latte::Types::WindowsAlwaysCover,
Latte::Types::SideBar,
Latte::Types::SidebarOnDemand,
Latte::Types::SidebarAutoHide
};

@ -424,7 +424,7 @@ Item{
onThicknessZoomOriginalChanged: updateMaskArea();
function slotContainsMouseChanged() {
if(latteView.visibility.containsMouse && latteView.visibility.mode !== LatteCore.Types.SideBar) {
if(latteView.visibility.containsMouse && latteView.visibility.mode !== LatteCore.Types.SidebarOnDemand) {
updateMaskArea();
if (slidingAnimationAutoHiddenOut.running && !inTempHiding && !inForceHiding) {
@ -460,7 +460,7 @@ Item{
//! Normal Dodge/AutoHide case
if((!slidingAnimationAutoHiddenOut.running
&& !latteView.visibility.blockHiding
&& (!latteView.visibility.containsMouse || latteView.visibility.mode === LatteCore.Types.SideBar))
&& (!latteView.visibility.containsMouse || latteView.visibility.mode === LatteCore.Types.SidebarOnDemand))
|| inForceHiding) {
slidingAnimationAutoHiddenOut.init();
}
@ -601,7 +601,7 @@ Item{
}
}
if (latteView.visibility.isHidden && latteView && latteView.visibility.mode === LatteCore.Types.SideBar) {
if (latteView.visibility.isHidden && latteView && latteView.visibility.mode === LatteCore.Types.SidebarOnDemand) {
//!hide completely
localX = -1;
localY = -1;

@ -33,7 +33,7 @@ Item {
&& !root.containsOnlyPlasmaTasks
&& layouter.fillApplets<=0
&& latteView
&& latteView.visibility.mode !== LatteCore.Types.SideBar
&& latteView.visibility.mode !== LatteCore.Types.SidebarOnDemand
&& latteView.visibility.mode !== LatteCore.Types.SidebarAutoHide
property int iconSize: -1 //it is not set, this is the default

@ -377,8 +377,8 @@ Window{
case LatteCore.Types.WindowsAlwaysCover:
return "Windows Always Cover";
break;
case LatteCore.Types.SideBar:
return "OnDemand SideBar";
case LatteCore.Types.SidebarOnDemand:
return "OnDemand Sidebar";
break;
case LatteCore.Types.SidebarAutoHide:
return "AutoHide Sidebar";

@ -53,7 +53,7 @@ public:
WindowsGoBelow,
WindowsCanCover,
WindowsAlwaysCover,
SideBar,
SidebarOnDemand,
SidebarAutoHide,
NormalWindow = 20
};

@ -90,7 +90,7 @@ PlasmaComponents.Page {
Layout.fillWidth: true
value: plasmoid.configuration.iconSize
from: 16
to: (latteView.visibility.mode === LatteCore.Types.SideBar || latteView.visibility.mode === LatteCore.Types.SidebarAutoHide) ? 512 : 256
to: (latteView.visibility.mode === LatteCore.Types.SidebarOnDemand || latteView.visibility.mode === LatteCore.Types.SidebarAutoHide) ? 512 : 256
stepSize: dialog.advancedLevel || (plasmoid.configuration.iconSize % 8 !== 0) || dialog.viewIsPanel ? 1 : 8
wheelEnabled: false
@ -139,7 +139,7 @@ PlasmaComponents.Page {
Layout.fillWidth: true
value: plasmoid.configuration.proportionIconSize
from: 1.0
to: (latteView.visibility.mode === LatteCore.Types.SideBar || latteView.visibility.mode === LatteCore.Types.SidebarAutoHide) ? 25 : 12
to: (latteView.visibility.mode === LatteCore.Types.SidebarOnDemand || latteView.visibility.mode === LatteCore.Types.SidebarAutoHide) ? 25 : 12
stepSize: 0.5
wheelEnabled: false

@ -447,7 +447,7 @@ PlasmaComponents.Page {
enabled: !(latteView.visibility.mode === LatteCore.Types.AlwaysVisible
|| latteView.visibility.mode === LatteCore.Types.WindowsGoBelow
|| latteView.visibility.mode === LatteCore.Types.WindowsAlwaysCover
|| latteView.visibility.mode === LatteCore.Types.SideBar)
|| latteView.visibility.mode === LatteCore.Types.SidebarOnDemand)
LatteComponents.Header {
text: i18n("Delay")
@ -808,7 +808,8 @@ PlasmaComponents.Page {
tooltip: i18n("After the view becomes hidden, KWin is informed to track user feedback. For example an edge visual hint is shown whenever the mouse approaches the hidden view")
enabled: !dialog.viewIsPanel
&& !latteView.byPassWM
&& latteView.visibility.mode !== LatteCore.Types.SideBar
&& latteView.visibility.mode !== LatteCore.Types.SidebarOnDemand
&& latteView.visibility.mode !== LatteCore.Types.SidebarAutoHide
onClicked: {
latteView.visibility.enableKWinEdges = checked;

@ -29,7 +29,7 @@ LatteComponents.ComboBoxButton{
id: custom
checkable: true
buttonToolTip: mode === LatteCore.Types.SideBar ? i18n("SideBar can be shown only when the user has explicitly requested it. For example through an external applet, shortcut or script") : ""
buttonToolTip: mode === LatteCore.Types.SidebarOnDemand ? i18n("Sidebar can be shown only when the user has explicitly requested it. For example through an external applet, shortcut or script") : ""
comboBoxTextRole: "name"
comboBoxBlankSpaceForEmptyIcons: false
@ -135,9 +135,9 @@ LatteComponents.ComboBoxButton{
name: i18n("Windows Always Cover"),
}
var sideBar = {
var sidebarOnDemand = {
pluginId: '8',
name: i18n("On Demand SideBar")
name: i18n("On Demand Sidebar")
}
var sidebarAutoHide = {
@ -148,7 +148,7 @@ LatteComponents.ComboBoxButton{
actionsModel.append(windowsGoBelow);
actionsModel.append(windowsCanCover);
actionsModel.append(windowsAlwaysCover);
actionsModel.append(sideBar);
actionsModel.append(sidebarOnDemand);
actionsModel.append(sidebarAutoHide);
}

Loading…
Cancel
Save