diff --git a/src/settings.cpp b/src/settings.cpp
index 0142d502b0..5d65795107 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1081,12 +1081,6 @@ static bool VerticalToolbarChanged(int32 p1)
return true;
}
-static bool TouchscreenModeChanged(int32 p1)
-{
- //ResetTabletWindow();
- return true;
-}
-
/**
* Update any possible saveload window and delete any newgrf dialogue as
* its widget parts might change. Reinit all windows as it allows access to the
diff --git a/src/settings_type.h b/src/settings_type.h
index 6a9752c991..235b7bebc7 100644
--- a/src/settings_type.h
+++ b/src/settings_type.h
@@ -21,7 +21,6 @@
#include "linkgraph/linkgraph_type.h"
#include "zoom_type.h"
#include "openttd.h"
-#include "toolbar_type.h"
/** Settings profiles and highscore tables. */
diff --git a/src/table/settings.ini b/src/table/settings.ini
index 4a1036aea4..478f6abf9e 100644
--- a/src/table/settings.ini
+++ b/src/table/settings.ini
@@ -41,7 +41,6 @@ static bool InvalidateCompanyInfrastructureWindow(int32 p1);
static bool InvalidateCompanyWindow(int32 p1);
static bool ZoomMinMaxChanged(int32 p1);
static bool VerticalToolbarChanged(int32 p1);
-static bool TouchscreenModeChanged(int32 p1);
#ifdef ENABLE_NETWORK
static bool UpdateClientName(int32 p1);
diff --git a/src/toolbar_gui.h b/src/toolbar_gui.h
index 3461c22902..1ad147b3f2 100644
--- a/src/toolbar_gui.h
+++ b/src/toolbar_gui.h
@@ -16,8 +16,6 @@ void AllocateToolbar();
void ToggleBoundingBoxes();
void ToggleDirtyBlocks();
-void ResetTabletWindow();
-
extern int _last_clicked_toolbar_idx;
#endif /* TOOLBAR_GUI_H */
diff --git a/src/toolbar_type.h b/src/toolbar_type.h
deleted file mode 100644
index 682cf2f568..0000000000
--- a/src/toolbar_type.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file toolbar_type.h Types related to toolbars. */
-
-#ifndef TOOLBAR_TYPE_H
-#define TOOLBAR_TYPE_H
-
-/** Types of touchscreen modes. */
-enum TouchscreenMode {
- TSC_NONE = 0,
- TSC_SIMPLE,
- TSC_CONFIRM,
-};
-DECLARE_CYCLE(TouchscreenMode, TSC_NONE, TSC_CONFIRM)
-typedef SimpleTinyEnumT TouchscreenModeByte;
-
-#endif /* TOOLBAR_TYPE_H */
diff --git a/src/window.cpp b/src/window.cpp
index 6a619edae5..67cc604332 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -3449,7 +3449,7 @@ static int PositionWindow(Window *w, WindowClass clss, int setting)
*/
int PositionMainToolbar(Window *w)
{
- if (_settings_client.gui.vertical_toolbar) return 0;
+ if (_settings_client.gui.vertical_toolbar) return 0; /* Always at the left */
DEBUG(misc, 5, "Repositioning Main Toolbar...");
return PositionWindow(w, WC_MAIN_TOOLBAR, _settings_client.gui.toolbar_pos);
}
@@ -3525,13 +3525,19 @@ void RelocateAllWindows(int neww, int newh)
continue;
case WC_MAIN_TOOLBAR:
- case WC_MAIN_TOOLBAR_RIGHT:
ResizeWindow(w, min(neww, w->window_desc->default_width) - w->width, 0, false);
top = w->top;
left = PositionMainToolbar(w); // changes toolbar orientation
break;
+ case WC_MAIN_TOOLBAR_RIGHT:
+ ResizeWindow(w, min(neww, w->window_desc->default_width) - w->width, 0, false);
+
+ top = w->top;
+ left = neww - w->width;
+ break;
+
case WC_NEWS_WINDOW:
top = newh - w->height;
left = PositionNewsMessage(w);