Skip to content

Commit 5dacf41

Browse files
committed
issue doxygen#11549 Leftover variable in CSS (validation and possible logic issue)
- `width: $width` is handled in navtree.js - css files are not handled by means of `copyResource...` anymore - handling of the contents of Luminance files is done solely in css files now, so no separate Luminace template files anymore
1 parent 1223158 commit 5dacf41

File tree

3 files changed

+1
-58
lines changed

3 files changed

+1
-58
lines changed

src/resourcemgr.cpp

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -99,62 +99,6 @@ bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,
9999
}
100100
}
101101
break;
102-
case Resource::Luminance:
103-
{
104-
QCString n = name;
105-
n = n.left(n.length()-4)+".png"; // replace .lum by .png
106-
const uint8_t *data = res->data;
107-
uint16_t width = (data[0]<<8)+data[1];
108-
uint16_t height = (data[2]<<8)+data[3];
109-
ColoredImgDataItem images[2];
110-
images[0].name = n.data();
111-
images[0].width = width;
112-
images[0].height = height;
113-
images[0].content = &data[4];
114-
images[0].alpha = nullptr;
115-
images[1].name = nullptr; // terminator
116-
writeColoredImgData(targetDir,images);
117-
return TRUE;
118-
}
119-
break;
120-
case Resource::LumAlpha:
121-
{
122-
QCString n = name;
123-
n = n.left(n.length()-5)+".png"; // replace .luma by .png
124-
const uint8_t *data = res->data;
125-
uint16_t width = (data[0]<<8)+data[1];
126-
uint16_t height = (data[2]<<8)+data[3];
127-
ColoredImgDataItem images[2];
128-
images[0].name = n.data();
129-
images[0].width = width;
130-
images[0].height = height;
131-
images[0].content = &data[4];
132-
images[0].alpha = &data[4+width*height];
133-
images[1].name = nullptr; // terminator
134-
writeColoredImgData(targetDir,images);
135-
return TRUE;
136-
}
137-
break;
138-
case Resource::CSS:
139-
{
140-
std::ofstream t = Portable::openOutputStream(pathName,append);
141-
if (t.is_open())
142-
{
143-
QCString buf(res->size, QCString::ExplicitSize);
144-
memcpy(buf.rawData(),res->data,res->size);
145-
buf = replaceColorMarkers(buf);
146-
if (name=="navtree.css")
147-
{
148-
t << substitute(buf,"$width",QCString().setNum(Config_getInt(TREEVIEW_WIDTH))+"px");
149-
}
150-
else
151-
{
152-
t << substitute(buf,"$doxygenversion",getDoxygenVersion());
153-
}
154-
return TRUE;
155-
}
156-
}
157-
break;
158102
case Resource::SVG:
159103
{
160104
std::ofstream t = Portable::openOutputStream(pathName,append);

src/resourcemgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/** @brief Compiled resource */
2525
struct Resource
2626
{
27-
enum Type { Verbatim, Luminance, LumAlpha, CSS, SVG };
27+
enum Type { Verbatim, CSS, SVG };
2828
const char *category;
2929
const char *name;
3030
const unsigned char *data;

templates/html/navtree.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
display:block;
8787
position: absolute;
8888
left: 0px;
89-
width: $width;
9089
overflow : hidden;
9190
}
9291

0 commit comments

Comments
 (0)