Searched +hist:2 +hist:cfeb3ca (Results 1 - 2 of 2) sorted by relevance

/haiku/src/apps/stylededit/
H A DStyledEditView.cppdiff d9385a9d Mon Jul 20 09:00:41 MDT 2020 John Scipione <jscipione@gmail.com> IK: align BTextView text rect/fix alignment

Recalculate line breaks in FrameResized() if word-wrap is on, otherwise
only move the text rect into position. StyledEdit was recalculating line
breaks before on resize (we have to in this mode) and the frame offset
updates for non-wrapping text views are inexpensive. This makes resizing
text view's work like StyledEdit everywhere.

Scroll to cursor when word-wrap setting changes if text view is editable.
If you are viewing a long document changing word-wrap can move the cursor
quite far, so scroll back to it.

Fix _ActualTabWidth() pen location for right and center-aligned text views
so that tabs widths are calculated correctly.

Reset fTextRect horizontal limits to bounds minus insets in
_RecalculateLineBreaks(), then grow fTextRect based on alignment when
wrap is off.

Fixing insets also fixes right and center-aligned BTextViews.
Left-aligned text view's grow right, right-aligned ones grow left,
and center-aligned ones grow out.

Make extra scrolling space for all aligned text views go the other way
from how it did in hrev24130 (and on left-aligned text view's too) so
that half the text is visible when you edit past the end or before the
beginnning of a text view instead of none of it.

Fixes #1651 #12608 #13796 #15189

Do not _RecalculateLineBreaks() if text view bounds are invalid.
In SetText() detect invalid text view bounds and resize the view to the
width and height of the first line. Then recalculate line breaks.
This fixes BAlert text view size issues.

Fixes #16481 (regression from hrev54496.)

Remove useless and heavy computation. There is no point in computing line
breaks for a 10px wide text view and it takes a long time because it needs
a lot of linebreaks. The view eventually gets laid out properly.

Fixes #5582 (which was not locale-related, after all.)

Only apply default insets if text rect is set to bounds. This ensures
that apps that manipulate the text rect can continue to do so without
the default insets interfering while apps that don't can benefit
from the defaults. If you want to set the text rect to bounds and
not use the default insets you must override the default by calling
SetInsets(). This prevent the default insets from being applied once
apps have changed the text rect fixing a bug in Icon-O-Matic where the
text rect insets were being applied incorrectly.

Fixes #16488 (regression from hrev54496.)

Reduce left and right insets inside text views from full label spacing
to half label spacing. Unify padding between BTextControl and BTextView.

Move fLayoutData->UpdateInsets() to private BTextView::_UpdateInsets()
because we need access to BTextView member variables when deciding
whether or not to add the default padding or not.

_UpdateInsets() changes:
* Don't update insets if BTextView::SetInsets() was called.
* Don't add default insets unless fTextRect is set to view Bounds().
* Do not set the right and bottom insets to left and top if negative,
set them to 0 like we do to left and top -- DeskCalc bug otherwise.

Fixes #15688

Other BTextView fixes:
* Replace max_c and min_c with std::max and std::min respectively.
* Remove scrolling from one instance of BTextView::SetText() as it
produced undesired results while editing a scrolled text view.
* Add default insets in _UpdateInsets()
* Fix scrolling when entering and deleting text so that some part of
the text is always visible. Make visible scroll width depend on font
size.
* Allow scrolling to a negative offset in x but not y. This allows you
to scroll the entire contents of right and centered-aligned text views
whose content does not fit in the box.
* Change _Refresh() to take an offset instead of a bool so that you can
scroll to any offset.
* Replace TextLength() with fText->Length() in a couple of places.

TextControl changes:
* Set text rect in BTextControl::DoLayout().
* Remove AlignTextRect() from TextInput.

Fix the following problems in apps:

ScreenSaver: Set text rect in PreviewView::AddPreview().
Tracker: Set "Edit name" text view insets to 2. Tweek text rect position
to be on top of label in icon, mini-icon, and list mode. Add a TODO that
the text rect is a pixel off from the name on some files.
Mail: Remove _AlignTextRect() and FrameResized() from AddressTextControl.
Use default insets on the text view, defaults are fine here.
DeskCalc: Set insets based on font size in ExpressionTextView
SetTextRect() instead of manipulating the text rect.
Remove _CheckTextRect() and related methods from InputTextView.
Icon-O-Matic: Remove _CheckTextRect() and related methods from InputTextView.
WebPositive: Remove _AlignTextRect() and FrameResized() from URLTextView
and call SetInsets().
StyledEdit: Word-wrap and FrameResized() changes ported to BTextView.

Fixes #16476 #16480 #16488 (regressions from hrev54496.)

Change-Id: Ifeca6077f8815ccd86d5a3880f99556298aaf0fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3152
Reviewed-by: John Scipione <jscipione@gmail.com>
diff e62d9cf8 Tue Jun 30 11:26:48 MDT 2015 Philippe Saint-Pierre <stpere@gmail.com> StyledEdit: Rework of the font color system

1) The default font color is now B_DOCUMENT_TEXT_COLOR
2) The font color menu now shows a palette
3) The font color menu now includes a "default" item, set
to B_DOCUMENT_TEXT_COLOR
4) Added a Todo mentionning it would be ideal to not save the default color
itself, but instead saving the fact the default color was used. Maybe allow the
StyleBuffer to use a Null color or something similar.
diff 2cfeb3ca Thu Apr 04 03:37:31 MDT 2013 John Scipione <jscipione@gmail.com> Update StyledEdit to use document background color. Style fixes.

See ticket #5293 Colors_picture2.png
diff 2cfeb3ca Thu Apr 04 03:37:31 MDT 2013 John Scipione <jscipione@gmail.com> Update StyledEdit to use document background color. Style fixes.

See ticket #5293 Colors_picture2.png
diff e62d9cf8c568e4fd2c80e163cbdae5a4376e898f Tue Jun 30 11:26:48 MDT 2015 Philippe Saint-Pierre <stpere@gmail.com> StyledEdit: Rework of the font color system

1) The default font color is now B_DOCUMENT_TEXT_COLOR
2) The font color menu now shows a palette
3) The font color menu now includes a "default" item, set
to B_DOCUMENT_TEXT_COLOR
4) Added a Todo mentionning it would be ideal to not save the default color
itself, but instead saving the fact the default color was used. Maybe allow the
StyleBuffer to use a Null color or something similar.
diff 2cfeb3ca9cf0e90a154133fb14d9edf3f9fbad54 Thu Apr 04 03:37:31 MDT 2013 John Scipione <jscipione@gmail.com> Update StyledEdit to use document background color. Style fixes.

See ticket #5293 Colors_picture2.png
H A DStyledEditWindow.cppdiff d9385a9d Mon Jul 20 09:00:41 MDT 2020 John Scipione <jscipione@gmail.com> IK: align BTextView text rect/fix alignment

Recalculate line breaks in FrameResized() if word-wrap is on, otherwise
only move the text rect into position. StyledEdit was recalculating line
breaks before on resize (we have to in this mode) and the frame offset
updates for non-wrapping text views are inexpensive. This makes resizing
text view's work like StyledEdit everywhere.

Scroll to cursor when word-wrap setting changes if text view is editable.
If you are viewing a long document changing word-wrap can move the cursor
quite far, so scroll back to it.

Fix _ActualTabWidth() pen location for right and center-aligned text views
so that tabs widths are calculated correctly.

Reset fTextRect horizontal limits to bounds minus insets in
_RecalculateLineBreaks(), then grow fTextRect based on alignment when
wrap is off.

Fixing insets also fixes right and center-aligned BTextViews.
Left-aligned text view's grow right, right-aligned ones grow left,
and center-aligned ones grow out.

Make extra scrolling space for all aligned text views go the other way
from how it did in hrev24130 (and on left-aligned text view's too) so
that half the text is visible when you edit past the end or before the
beginnning of a text view instead of none of it.

Fixes #1651 #12608 #13796 #15189

Do not _RecalculateLineBreaks() if text view bounds are invalid.
In SetText() detect invalid text view bounds and resize the view to the
width and height of the first line. Then recalculate line breaks.
This fixes BAlert text view size issues.

Fixes #16481 (regression from hrev54496.)

Remove useless and heavy computation. There is no point in computing line
breaks for a 10px wide text view and it takes a long time because it needs
a lot of linebreaks. The view eventually gets laid out properly.

Fixes #5582 (which was not locale-related, after all.)

Only apply default insets if text rect is set to bounds. This ensures
that apps that manipulate the text rect can continue to do so without
the default insets interfering while apps that don't can benefit
from the defaults. If you want to set the text rect to bounds and
not use the default insets you must override the default by calling
SetInsets(). This prevent the default insets from being applied once
apps have changed the text rect fixing a bug in Icon-O-Matic where the
text rect insets were being applied incorrectly.

Fixes #16488 (regression from hrev54496.)

Reduce left and right insets inside text views from full label spacing
to half label spacing. Unify padding between BTextControl and BTextView.

Move fLayoutData->UpdateInsets() to private BTextView::_UpdateInsets()
because we need access to BTextView member variables when deciding
whether or not to add the default padding or not.

_UpdateInsets() changes:
* Don't update insets if BTextView::SetInsets() was called.
* Don't add default insets unless fTextRect is set to view Bounds().
* Do not set the right and bottom insets to left and top if negative,
set them to 0 like we do to left and top -- DeskCalc bug otherwise.

Fixes #15688

Other BTextView fixes:
* Replace max_c and min_c with std::max and std::min respectively.
* Remove scrolling from one instance of BTextView::SetText() as it
produced undesired results while editing a scrolled text view.
* Add default insets in _UpdateInsets()
* Fix scrolling when entering and deleting text so that some part of
the text is always visible. Make visible scroll width depend on font
size.
* Allow scrolling to a negative offset in x but not y. This allows you
to scroll the entire contents of right and centered-aligned text views
whose content does not fit in the box.
* Change _Refresh() to take an offset instead of a bool so that you can
scroll to any offset.
* Replace TextLength() with fText->Length() in a couple of places.

TextControl changes:
* Set text rect in BTextControl::DoLayout().
* Remove AlignTextRect() from TextInput.

Fix the following problems in apps:

ScreenSaver: Set text rect in PreviewView::AddPreview().
Tracker: Set "Edit name" text view insets to 2. Tweek text rect position
to be on top of label in icon, mini-icon, and list mode. Add a TODO that
the text rect is a pixel off from the name on some files.
Mail: Remove _AlignTextRect() and FrameResized() from AddressTextControl.
Use default insets on the text view, defaults are fine here.
DeskCalc: Set insets based on font size in ExpressionTextView
SetTextRect() instead of manipulating the text rect.
Remove _CheckTextRect() and related methods from InputTextView.
Icon-O-Matic: Remove _CheckTextRect() and related methods from InputTextView.
WebPositive: Remove _AlignTextRect() and FrameResized() from URLTextView
and call SetInsets().
StyledEdit: Word-wrap and FrameResized() changes ported to BTextView.

Fixes #16476 #16480 #16488 (regressions from hrev54496.)

Change-Id: Ifeca6077f8815ccd86d5a3880f99556298aaf0fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3152
Reviewed-by: John Scipione <jscipione@gmail.com>
diff e62d9cf8 Tue Jun 30 11:26:48 MDT 2015 Philippe Saint-Pierre <stpere@gmail.com> StyledEdit: Rework of the font color system

1) The default font color is now B_DOCUMENT_TEXT_COLOR
2) The font color menu now shows a palette
3) The font color menu now includes a "default" item, set
to B_DOCUMENT_TEXT_COLOR
4) Added a Todo mentionning it would be ideal to not save the default color
itself, but instead saving the fact the default color was used. Maybe allow the
StyleBuffer to use a Null color or something similar.
diff 2cfeb3ca Thu Apr 04 03:37:31 MDT 2013 John Scipione <jscipione@gmail.com> Update StyledEdit to use document background color. Style fixes.

See ticket #5293 Colors_picture2.png
diff 2cfeb3ca Thu Apr 04 03:37:31 MDT 2013 John Scipione <jscipione@gmail.com> Update StyledEdit to use document background color. Style fixes.

See ticket #5293 Colors_picture2.png
diff 776c58b2 Sun Dec 30 12:22:12 MST 2012 Humdinger <humdingerb@gmail.com> Unifying the quit/save alerts.

Wherever I found an alert prompting to save changes, I used the
button labeling 'Cancel', 'Don't save', 'Save' with the first button
left aligned, 2nd and 3rd right aligned.

I added the shortcuts 'd' for 'Don't save, and 's' for 'Save' where
not already set.

The topic was discussed at
http://permalink.gmane.org/gmane.os.haiku.devel/23244
The discussion died down, I hope I made changes everyone can live with.
diff 87162054 Wed Apr 06 02:47:48 MDT 2011 Stephan Aßmus <superstippi@gmx.de> Follow up commit on r41184, which removed the Edit->Clear menu item.
I suppose it was discussed on the i18n list as mentioned in that
commit. However two things, Humdinger: 1) You did not test your commit,
and 2) You did incomplete cleanup. If you had removed the member variable
from the StyledEditWindow header, you would have gotten at least a
compile error. Those things being said, I did not test my changes
either... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41187 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff 2ee8f3f6 Fri Feb 25 15:18:31 MST 2011 Siarzhuk Zharski <zharik@gmx.li> Bunch of localization fixes pointed out by Diver. Thanks!

Notes:
- FileTypes: The "Same as" button label separated to two entities in dependency of
context: "Same Type as ..." and "Same Application as ...";
- Tracker: The sentences like "If you do %action [...]. To do %action [...]"
now use separately translated verbs for so called
"ifYouDoAction" and "toDoAction";
- NetworkStatus: NetworkStatusView _ShowConfiguration is fixed back after previous
attempt to localize it in r37337: useless code bloating purged out,
broken quasi-header "ifaceName information:" pulled back from Hell;
- StyledEdit: Menu item "Can't undo" had different casing in some situation. Looks
like HTA cannot detect such situation, so right lines "Can't undo"
were masked by wrong one "Can't Undo" and this line stay untranslated
for most time.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40688 a95241bf-73f2-0310-859d-f6bbb57e9c96
diff e62d9cf8 Tue Jun 30 11:26:48 MDT 2015 Philippe Saint-Pierre <stpere@gmail.com> StyledEdit: Rework of the font color system

1) The default font color is now B_DOCUMENT_TEXT_COLOR
2) The font color menu now shows a palette
3) The font color menu now includes a "default" item, set
to B_DOCUMENT_TEXT_COLOR
4) Added a Todo mentionning it would be ideal to not save the default color
itself, but instead saving the fact the default color was used. Maybe allow the
StyleBuffer to use a Null color or something similar.
diff 2cfeb3ca Thu Apr 04 03:37:31 MDT 2013 John Scipione <jscipione@gmail.com> Update StyledEdit to use document background color. Style fixes.

See ticket #5293 Colors_picture2.png
diff 2cfeb3ca Thu Apr 04 03:37:31 MDT 2013 John Scipione <jscipione@gmail.com> Update StyledEdit to use document background color. Style fixes.

See ticket #5293 Colors_picture2.png

Completed in 106 milliseconds