何か新しいデザインにしてみたくてテーマを変えてみた。

nimbusとか。

多少気に食わない部分はCSSで変更。


これからプログラムコードを書くのにスーパーPre記法を使う事になりそうなのでシンタックスハイライトのスタイルを調整してみる。

テストコード

        private bool createPDFImage() {
            string pdfFilePath = this.imagePath + @"\" + Path.GetRandomFileName() + ".pdf";
            string securePdfFilePath = this.imagePath + @"\" + Path.GetRandomFileName() + ".pdf";

            Document document = new Document();
            document.setPageSize(PageSize.A4);
            document.setMargins(0, 0, 0, 0);
            PdfWriter.getInstance(document, new FileStream(pdfFilePath, FileMode.Create));
            float printableWidth = document.pageSize.width() - document.marginLeft - document.marginRight;
            float printableHeight = document.pageSize.height() - document.marginTop - document.marginBottom;
            document.open();

            foreach (string filename in this.listBox1.Items) {
                com.lowagie.text.Image jpg = com.lowagie.text.Image.getInstance(this.imagePath + @"\" + filename);
                //アスペクト比固定でギリまで拡大/縮小
                if (jpg.width() > printableWidth || jpg.height() > printableHeight) {
                    double ratio = (printableWidth / jpg.width());
                    ratio = (printableHeight / jpg.height()) > ratio ? ratio : (printableHeight / jpg.height());
                    jpg.scalePercent((int)(ratio * 100));
                }
                jpg.setAlignment(com.lowagie.text.Image.LEFT);
                document.add(jpg);
                document.newPage();
            }
            document.close();
        }


変更部分

.syntax-highlight{
  border-left: 5px solid #DDD;
}
.syntax-highlight .synType{
  font-weight:bold ;
  color:#00ffff;
}
.syntax-highlight .synStatement{
  font-weight:bold ;
  color:#00ffff;
}
.syntax-highlight .synConstant{
  color:#00ff00;
}
.syntax-highlight .synComment{
  color:#ffff00;
}

delphi3の頃使ってた設定にしてみた。個人的には見やすいけどどうなんだろ。