Commit Graph

85 Commits

Author SHA1 Message Date
Juergen Spitzmueller
26755a015e Make GUI string translatable
Part of #10999
2018-01-27 10:57:33 +01:00
Richard Heck
75bfed5507 Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
Guillaume Munch
6144bbfbf8 Replace foreach with for
C++11 allows foreach-style iterations with the following syntax:

for (auto & element : container) {
 ...
}
2016-06-12 19:17:33 +01:00
Juergen Spitzmueller
b423c59d3c Factor out multiply used ColorSorter.
This cures one problem of monolithic build (where the function was
ambiguous)
2015-11-16 08:19:16 +01:00
Georg Baum
d5ed835225 Revert the box alignment part of 8010b90c
The horizontal alignment changes caused a regression for documents in older
formats. This could have been fixed by adding the following lines to the
format entry for 489 in development/FORMAT:

	Previously, the horizontal position was ignored except for the
	following parameter combinations:
	- fixed width and type Boxed and without inner box
	- fixed width and any type   and with    inner box and with makebox
	Now, it is also used for the parameter combination below:
	- makebox is not used and not (type Boxed and without inner box)

and a corresponding conversion to convert_BoxFeatures() in
lib/lyx2lyx/lyx_2_2.py. However, it was decided to revert the box alignment
changes instead: The box alignment can contradict the paragraph alignment. A
better way to avoid the additional space that can be created by paragraph
alignment (which was the motivation for implementing box alignment) is the
same as for table cells (see noTrivlistCentering() in src/Paragraph.cpp).
This would be a file format change and it is too late now for 2.2.0.

See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg188147.html for the
complete discussion (subject "Regression in lyx2lyx box alignment").
2015-10-23 22:08:38 +02:00
Juergen Spitzmueller
14557b28d9 Complilation fix.
This time without unwandted po stuff.
2015-05-19 12:56:31 +02:00
Juergen Spitzmueller
01e7a10029 Revert "Complilation fix."
This reverts commit abf8208679.

I'll properly re-commit in a minute.
2015-05-19 12:52:19 +02:00
Juergen Spitzmueller
abf8208679 Complilation fix. 2015-05-19 12:37:45 +02:00
Juergen Spitzmueller
e1b1dd7445 GuiBox: remove unneeded connection and use a more senible signal 2015-05-18 13:13:04 +02:00
Juergen Spitzmueller
7d67e94cd0 GuiBox: do not rely on count (as explained on lyx-devel) 2015-05-18 13:12:26 +02:00
Juergen Spitzmueller
a98cfe1874 GuiBox: sort colors 2015-05-18 13:11:34 +02:00
Juergen Spitzmueller
bca8f5a940 GuiBox: remove none from the static color list
It is not used anyway and it prevents sorting.
2015-05-18 13:10:32 +02:00
Juergen Spitzmueller
47bee41ea3 GuiBox: assure combo boxes are empty before filling 2015-05-18 13:09:07 +02:00
Juergen Spitzmueller
edfdd5139e GuiBox: swap filling of color combos 2015-05-18 13:07:00 +02:00
Juergen Spitzmueller
2548e7fd98 GuiBox: simplification 2015-05-18 13:05:28 +02:00
Uwe Stöhr
8dd217c983 GuiBox.cpp: fix bug introduced by [bec3f7bc/lyxgit]
There were now 2 entries named "none" in backgroundcolorCO

- delete the fixmes; the LateX name is used as parameter to save unnecessary conversions for the LateX output; please ask me before adding fixmes
2015-05-17 01:45:56 +02:00
Uwe Stöhr
51e3b026b2 GuiBox.cpp: a compile fix 2015-05-17 01:28:06 +02:00
Juergen Spitzmueller
bec3f7bc8c Fix up GuiBox (use proper data/view separation and clean up) 2015-05-16 11:27:13 +02:00
Uwe Stöhr
bd80617cdb GuiBox.cpp: enable color features also for non-English locales
stupid me, I used a translatable string as box parameter. Therefore the feature only worked correctly with English locale. Now it works for every locale.
2015-05-16 05:22:22 +02:00
Uwe Stöhr
0140063c8e GuiBox.cpp: add a comment and a string conversion 2015-05-16 03:54:51 +02:00
Uwe Stöhr
88593e0ec6 support for colored boxes
adds support to set colors for some box types (support for the LaTeX commands \fcolorbox and \colorbox)

fileformat change
2015-05-16 03:22:37 +02:00
Uwe Stöhr
ffb4146d17 GuiBox.cpp: fix logic
- if pagebreaks are allowed there cannot be defined a width
2015-05-15 06:04:46 +02:00
Uwe Stöhr
6780a30409 GuiBox.cpp: fix logic
- if pagebreaks are allowed there cannot be defined a width
2015-05-15 06:02:41 +02:00
Uwe Stöhr
a5cc5dce3c GuiBox.cpp: assure that the parameters are not empty 2015-05-15 03:51:11 +02:00
Uwe Stöhr
858c12c6bb GuiBox.cpp: make a logic setting more clear 2015-05-13 01:16:35 +02:00
Uwe Stöhr
335ccee3b5 GuiBox.cpp: re-add lost braces
- FORMAT: add date
2015-05-11 22:16:36 +02:00
Uwe Stöhr
8010b90cb4 add ability to change box line thickness and separation
fileformat change
2015-05-11 21:30:32 +02:00
Uwe Stöhr
3290d15a15 GuiBox.cpp: add missing braces from previous commit 2015-05-10 21:42:45 +02:00
Uwe Stöhr
4be4d4e1a6 GuiBox.cpp: fix button logic (fixes bug #9543) 2015-05-10 15:54:03 +02:00
Juergen Spitzmueller
49fa913739 GuiBox: Factor out enabling/disabling to checkedWidgets.
Part of: #9541.
2015-05-10 13:02:00 +02:00
Juergen Spitzmueller
b309fa5d2b Implement checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
Uwe Stöhr
427aeff90f GuiBox.cpp, InsetBox.cpp: fix some wrong logic
- InsetBox.cpp:
 a framebox without inner box and without a width is \fbox
 a framebox with inner box is also \fbox
 a framebox without inner box and with width is \framebox

- GuiBox.cpp: the width checkbox must be checked if there is width
2013-05-25 15:07:17 +02:00
Uwe Stöhr
472732f92d GuiBox.cpp: addendum to [f04c7711/lyxgit]
- this was forgotten to commit;
(without this we would get invalid LaTeX code when changing in the box dialog a makebox without a width to a minipage and press apply - a makebox required to specify a width, at least an invisible one like "0cm")
2013-05-25 13:52:09 +02:00
Jean-Marc Lasgouttes
f04c7711b0 Fix empty width support for Box inset
* InsetBox and GuiBox: Use proper empty length instead of the broken -9.99col% trick
* some slight changes to the logic of GuiBox to make sure that values are set as needed.
* lengthToWidget(): handle properly the empty length case. All the other related Qt helpers did it already, it was probably an oversight. Also set the default_unit parameter as optional (not needed in this patch actually, but I got carried away :)
* allow generating LaTeX code for an empty length, since some broken code does that.
2013-05-24 15:44:59 +02:00
Uwe Stöhr
72b2c54fae GuiBox.cpp: fix a dialog initialization issue
thanks Jean-Marc for the hint
2013-05-06 01:31:04 +02:00
Richard Heck
cca2d4c927 Crush warning. 2013-03-23 09:14:44 -04:00
Uwe Stöhr
22ad7e4369 support for \mbox and \fbox
- fileformat change
- it was a pity that LyX did not yet support a simple rectangular frame without a defined width but LyX did this for e.g. oval frames
- \fbox and \mbox often occur in TeX files and can now be imported
2013-03-22 01:33:58 +01:00
Uwe Stöhr
7d68833dc9 remove unused include of FuncRequest
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35189 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-24 03:07:09 +00:00
Richard Heck
c0cc803e55 Warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34815 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-08 20:01:17 +00:00
Vincent van Ravesteijn
1541a7f756 GuiBox.cpp: Remove some unnecessary negated logic.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34780 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-06 12:01:09 +00:00
Uwe Stöhr
ebcef496a5 - new support for makebox; fileformat change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34748 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-03 13:14:15 +00:00
Uwe Stöhr
7d031e1fef GuiBox.cpp: fix this issue: horizontal box alignment is only possible without inner box and simple frame (the same as with pagebreaks)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34713 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-26 21:02:14 +00:00
Jürgen Spitzmüller
3e2ca552af * GuiBoc.{cpp,h}:
- compare against combo box data instead of l7n string.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34709 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-26 07:57:54 +00:00
Jürgen Spitzmüller
ecfe108cde * GuiBoc.{cpp,h}:
- use proper combo box data instead of the current int mumbo jumbo.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34708 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-25 17:39:53 +00:00
Uwe Stöhr
c1bde420f8 GuiBox.cpp:
- fix another bug: shaded boxes can have a specified width when there is an inner box
- code optimizations according to http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg160048.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34532 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-28 03:01:18 +00:00
Uwe Stöhr
643803d0e2 GuiBox.cpp: fix #6721
Also for branch?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34471 a592a061-630c-0410-9148-cb99ea01b6c8
2010-05-23 16:36:06 +00:00
Abdelrazak Younes
bbda43a400 Attempt to simplify as much as possible Inset parameter dialog creation. We now just need an ui file and a class that inherits InsetParamsWidget and implement 4 methods. Then InsetParamsDialog will take care of the rest. InsetParamsDialog has 2 running mode: "immediate apply" and "Restore/OK/Close" which is the default; I hope this is enough to satisfy all users. The checkbox status might be saved later in session settings.
This new attempt replace the previous attempt with InsetDialog which was still too tight with the older framework.
Status:
float, ert, box, info: migrated
vspace: migrated but buggy. To be fixed later.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33480 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-15 23:17:45 +00:00
Abdelrazak Younes
ede4c8c370 GuiBox: don't call applyView twice
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33353 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-07 21:12:46 +00:00
Abdelrazak Younes
2f168bd342 Box dialog: migrate to the new InsetDialog architecture. This simplifies the code and allows for immediate application of any change in the dialog. This is quite a complicated and non intuitive dialog still...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33351 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-07 20:28:41 +00:00
Uwe Stöhr
8e3736c7b8 GuiBox.cpp: fix typo is comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31820 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-01 23:23:54 +00:00