mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 15:17:12 -05:00
add a splitter in clayout
This commit is contained in:
parent
2baeac93e8
commit
3df8411626
2 changed files with 501 additions and 490 deletions
|
|
@ -12,7 +12,8 @@ from anki.facts import *
|
||||||
from anki.fonts import toCanonicalFont
|
from anki.fonts import toCanonicalFont
|
||||||
from anki.cards import Card
|
from anki.cards import Card
|
||||||
from anki.sound import playFromText, clearAudioQueue
|
from anki.sound import playFromText, clearAudioQueue
|
||||||
from ankiqt.ui.utils import saveGeom, restoreGeom, getBase, mungeQA
|
from ankiqt.ui.utils import saveGeom, restoreGeom, getBase, mungeQA, \
|
||||||
|
saveSplitter, restoreSplitter
|
||||||
from anki.hooks import runFilter
|
from anki.hooks import runFilter
|
||||||
from ankiqt import ui
|
from ankiqt import ui
|
||||||
|
|
||||||
|
|
@ -71,6 +72,7 @@ class CardLayout(QDialog):
|
||||||
return
|
return
|
||||||
self.form = ankiqt.forms.clayout.Ui_Dialog()
|
self.form = ankiqt.forms.clayout.Ui_Dialog()
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
|
restoreSplitter(self.form.splitter, "clayout")
|
||||||
if type == 0:
|
if type == 0:
|
||||||
self.form.templateType.setText(
|
self.form.templateType.setText(
|
||||||
_("Templates used by fact:"))
|
_("Templates used by fact:"))
|
||||||
|
|
@ -318,6 +320,7 @@ order by n""", id=card.id)
|
||||||
self.mw.reset()
|
self.mw.reset()
|
||||||
self.deck.finishProgress()
|
self.deck.finishProgress()
|
||||||
saveGeom(self, "CardLayout")
|
saveGeom(self, "CardLayout")
|
||||||
|
saveSplitter(self.form.splitter, "clayout")
|
||||||
QDialog.reject(self)
|
QDialog.reject(self)
|
||||||
|
|
||||||
def onHelp(self):
|
def onHelp(self):
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,23 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>619</width>
|
<width>407</width>
|
||||||
<height>482</height>
|
<height>482</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Card Layout</string>
|
<string>Card Layout</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
|
<widget class="QSplitter" name="splitter">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="childrenCollapsible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
|
|
@ -499,8 +507,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</widget>
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="previewGroup">
|
<widget class="QGroupBox" name="previewGroup">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
|
@ -538,6 +545,7 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue