Related to the bugfix yesterday. #375

Merged
merged 0 commits into from May 18, 2013

Projects

None yet

4 participants

@bholland
bholland commented Jan 4, 2013

...etermined by the font ascent.

The font size in the legend was only determined by the font ascent. This has been fixed.

@NathanW2 NathanW2 and 1 other commented on an outdated diff Jan 4, 2013
src/core/composer/qgscomposerlegend.cpp
@@ -246,7 +246,7 @@ QSizeF QgsComposerLegend::drawGroupItemTitle( QgsComposerGroupItem* groupItem, Q
QStringList lines = splitStringForWrapping( groupItem->text() );
for ( QStringList::Iterator groupPart = lines.begin(); groupPart != lines.end(); ++groupPart )
{
- y += fontAscentMillimeters( mGroupFont );
+ y += fontAscentMillimeters( mGroupFont ) + fontDescentMillimeters( mGroupFont );
@NathanW2
NathanW2 Jan 4, 2013 Member

Are there any cases where you would want to use just ascent rather then both together. If not then it might be worth wrapping both in a single function to save the ascent + descent code everywhere.

@bholland
bholland Jan 4, 2013

To be honest, no. ATM I don't have a good way though of going through a
mess of code to find instance where fontAscentMillimeters is used. Do you
have a way to load this project into something like eclipse where I can
search a mess of files at once? I know how this works in python but I have
never been able to get this sort of thing to work outside of VS.

~Ben

On Fri, Jan 4, 2013 at 4:08 PM, Nathan Woodrow notifications@github.comwrote:

In src/core/composer/qgscomposerlegend.cpp:

@@ -246,7 +246,7 @@ QSizeF QgsComposerLegend::drawGroupItemTitle( QgsComposerGroupItem* groupItem, Q
QStringList lines = splitStringForWrapping( groupItem->text() );
for ( QStringList::Iterator groupPart = lines.begin(); groupPart != lines.end(); ++groupPart )
{

  • y += fontAscentMillimeters( mGroupFont );
  • y += fontAscentMillimeters( mGroupFont ) + fontDescentMillimeters( mGroupFont );

Are there any cases where you would want to use just ascent rather then
both together. If not then it might be worth wrapping both in a single
function to save the ascent + descent code everywhere.


Reply to this email directly or view it on GitHubhttps://github.com/qgis/Quantum-GIS/pull/375/files#r2555083.

@NathanW2
NathanW2 Jan 4, 2013 Member

Well I normally just use the search function in my text editor, which normally works fine. You can load the project in Qt Creator which will let you do something like VS can do to find references method or variable. Here is how to set it up using eclipse http://linfiniti.com/2011/12/compiling-qgis-with-eclipts-cdt-on-ubuntu/

@mach0
Member
mach0 commented Apr 12, 2013

Any News on this? Nathan?

@bholland

Oh, QGIS under the Qt IDE makes this quite simple. I like it. I haven't had
time recently to do much work in this area with the end of the semester and
all. I am actually finding working on QGIS quite difficult, not only for
this reason but that many objects seem to be in XML which is very difficult
to work with. For example, I wanted to add the functionality to select
layers to display while mapping and possibly have multiple maps on the same
canvas. All of this is done in xml currently which makes it very difficult
to split it up into objects and manipulate them. Even getting layers is
tricky since I have to go through a lot of XML just to find the names. I
will think about this more and hopefully in may I will have time to work on
this.

~Ben

On Fri, Apr 12, 2013 at 10:30 AM, Werner Macho notifications@github.comwrote:

Any News on this? Nathan?


Reply to this email directly or view it on GitHubhttps://github.com/qgis/Quantum-GIS/pull/375#issuecomment-16295965
.

@slarosa slarosa merged commit 2df1a20 into qgis:master May 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment