mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Place sidebar tools right of search bar
This commit is contained in:
parent
f5981e94bf
commit
2c25645975
2 changed files with 8 additions and 7 deletions
|
@ -946,14 +946,14 @@ QTableView {{ gridline-color: {grid} }}
|
||||||
self.form.actionSidebarFilter.triggered,
|
self.form.actionSidebarFilter.triggered,
|
||||||
self.focusSidebarSearchBar,
|
self.focusSidebarSearchBar,
|
||||||
)
|
)
|
||||||
l = QVBoxLayout()
|
grid = QGridLayout()
|
||||||
l.addWidget(toolbar)
|
grid.addWidget(searchBar, 0, 0)
|
||||||
l.addWidget(searchBar)
|
grid.addWidget(toolbar, 0, 1)
|
||||||
l.addWidget(self.sidebar)
|
grid.addWidget(self.sidebar, 1, 0, 1, 2)
|
||||||
l.setContentsMargins(0, 0, 0, 0)
|
grid.setContentsMargins(0, 0, 0, 0)
|
||||||
l.setSpacing(0)
|
grid.setSpacing(0)
|
||||||
w = QWidget()
|
w = QWidget()
|
||||||
w.setLayout(l)
|
w.setLayout(grid)
|
||||||
dw.setWidget(w)
|
dw.setWidget(w)
|
||||||
self.sidebarDockWidget.setFloating(False)
|
self.sidebarDockWidget.setFloating(False)
|
||||||
|
|
||||||
|
|
|
@ -259,6 +259,7 @@ class SidebarToolbar(QToolBar):
|
||||||
self._action_group = QActionGroup(self)
|
self._action_group = QActionGroup(self)
|
||||||
qconnect(self._action_group.triggered, self._on_action_group_triggered)
|
qconnect(self._action_group.triggered, self._on_action_group_triggered)
|
||||||
self._setup_tools()
|
self._setup_tools()
|
||||||
|
self.setIconSize(QSize(18, 18))
|
||||||
|
|
||||||
def _setup_tools(self) -> None:
|
def _setup_tools(self) -> None:
|
||||||
for row in self._tools:
|
for row in self._tools:
|
||||||
|
|
Loading…
Reference in a new issue