fix extra indentation in wxHTML_ALIGN_JUSTIFY display (patch 1565375)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -99,6 +99,7 @@ wxMSW:
|
|||||||
All:
|
All:
|
||||||
|
|
||||||
- Shut down the sockets gracefully (Sergio Aguayo)
|
- Shut down the sockets gracefully (Sergio Aguayo)
|
||||||
|
- Fix extra indentation in wxHTML_ALIGN_JUSTIFY display (Chacal)
|
||||||
|
|
||||||
wxMac:
|
wxMac:
|
||||||
|
|
||||||
|
@@ -884,12 +884,12 @@ void wxHtmlContainerCell::Layout(int w)
|
|||||||
if ( step > 0 )
|
if ( step > 0 )
|
||||||
{
|
{
|
||||||
// first count the cells which will get extra space
|
// first count the cells which will get extra space
|
||||||
int total = 0;
|
int total = -1;
|
||||||
|
|
||||||
const wxHtmlCell *c;
|
const wxHtmlCell *c;
|
||||||
if ( line != cell )
|
if ( line != cell )
|
||||||
{
|
{
|
||||||
for ( c = line->GetNext(); c != cell; c = c->GetNext() )
|
for ( c = line; c != cell; c = c->GetNext() )
|
||||||
{
|
{
|
||||||
if ( c->IsLinebreakAllowed() )
|
if ( c->IsLinebreakAllowed() )
|
||||||
{
|
{
|
||||||
@@ -901,11 +901,22 @@ void wxHtmlContainerCell::Layout(int w)
|
|||||||
// and now extra space to those cells which merit it
|
// and now extra space to those cells which merit it
|
||||||
if ( total )
|
if ( total )
|
||||||
{
|
{
|
||||||
// first cell on line is not moved:
|
// first visible cell on line is not moved:
|
||||||
|
while (line !=cell && !line->IsLinebreakAllowed())
|
||||||
|
{
|
||||||
|
line->SetPos(line->GetPosX() + s_indent,
|
||||||
|
line->GetPosY() + ypos);
|
||||||
|
line = line->GetNext();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line != cell)
|
||||||
|
{
|
||||||
line->SetPos(line->GetPosX() + s_indent,
|
line->SetPos(line->GetPosX() + s_indent,
|
||||||
line->GetPosY() + ypos);
|
line->GetPosY() + ypos);
|
||||||
|
|
||||||
line = line->GetNext();
|
line = line->GetNext();
|
||||||
|
}
|
||||||
|
|
||||||
for ( int n = 0; line != cell; line = line->GetNext() )
|
for ( int n = 0; line != cell; line = line->GetNext() )
|
||||||
{
|
{
|
||||||
if ( line->IsLinebreakAllowed() )
|
if ( line->IsLinebreakAllowed() )
|
||||||
|
Reference in New Issue
Block a user