Skip to content

Commit

Permalink
Fixed|libappfw: DocumentWidget tries to load too much text as textures
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jun 11, 2016
1 parent 94fa33f commit 86d695f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doomsday/sdk/libappfw/src/widgets/documentwidget.cpp
Expand Up @@ -13,7 +13,7 @@
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details. You should have received a copy of
* the GNU Lesser General Public License along with this program; if not, see:
* http://www.gnu.org/licenses</small>
* http://www.gnu.org/licenses</small>
*/

#include "de/DocumentWidget"
Expand Down Expand Up @@ -121,7 +121,7 @@ public Font::RichFormat::IStyle
}

void glInit()
{
{
atlas().audienceForReposition() += this;

glText.init(atlas(), self.font(), this);
Expand Down Expand Up @@ -208,7 +208,7 @@ public Font::RichFormat::IStyle

// Determine visible range of lines.
Font const &font = self.font();
int contentHeight = self.contentHeight();
int contentHeight = de::min(self.contentHeight(), self.rule().height().valuei());
int const extraLines = 1;
int numVisLines = contentHeight / font.lineSpacing().valuei() + 2 * extraLines;
int firstVisLine = scrollY / font.lineSpacing().valuei() - extraLines + 1;
Expand Down

0 comments on commit 86d695f

Please sign in to comment.